Main Page   Class Hierarchy   Alphabetical List   Data Structures   File List   Data Fields   Globals  

NML_SERVER Class Reference

#include <nml_srv.hh>

Inheritance diagram for NML_SERVER:

Inheritance graph
[legend]
Collaboration diagram for NML_SERVER:

Collaboration graph
[legend]

Public Methods

 NML_SERVER (NML *_nml, int set_to_master=0)
virtual ~NML_SERVER ()
void delete_from_list ()
void add_to_nml_server_list ()

Protected Attributes

int super_server_list_id
int being_deleted

Friends

class NML_SUPER_SERVER

Constructor & Destructor Documentation

NML_SERVER::NML_SERVER NML   _nml,
int    _set_to_master = 0
 

Definition at line 61 of file nml_srv.cc.

00061                                                      :
00062 CMS_SERVER ()
00063 {
00064   NML_SERVER_LOCAL_PORT *new_local_port = NULL;
00065   being_deleted = 0;
00066   if (NULL != _nml)
00067     {
00068       if (NULL != _nml->cms)
00069         {
00070           if (CMS_REMOTE_TYPE != _nml->cms->ProcessType)
00071             {
00072               NML *new_nml;
00073               if (_nml->cms->isserver &&
00074                   (0 == _set_to_master ||
00075                    (_nml->cms->is_local_master == 1 && _set_to_master == 1) ||
00076                    (_nml->cms->is_local_master == 0 && _set_to_master == -1)))
00077                 {
00078                   new_nml = _nml;
00079                   if (NULL != new_nml)
00080                     {
00081                       new_local_port = new NML_SERVER_LOCAL_PORT (new_nml);
00082                       add_local_port (new_local_port);
00083                     }
00084                   new_local_port->local_channel_reused = 1;
00085                 }
00086               else
00087                 {
00088                   new_nml = new NML (_nml, 1, -1);
00089                   if (NULL != new_nml)
00090                     {
00091                       new_local_port = new NML_SERVER_LOCAL_PORT (new_nml);
00092                       add_local_port (new_local_port);
00093                     }
00094                   new_local_port->local_channel_reused = 0;
00095                 }
00096             }
00097           else
00098             {
00099               rcs_print_error
00100                 ("NML_SERVER:(ERROR) ProcessType was REMOTE.\n");
00101               _nml = (NML *) NULL;
00102             }
00103         }
00104       else
00105         {
00106           rcs_print_error ("NML_SERVER:(ERROR) cms was NULL.\n");
00107         }
00108     }
00109   else
00110     {
00111       rcs_print_error ("NML_SERVER:(ERROR) nml_ptr was NULL.\n");
00112     }
00113   add_to_nml_server_list ();
00114 }

NML_SERVER::~NML_SERVER   [virtual]
 

Definition at line 129 of file nml_srv.cc.

00130 {
00131   being_deleted = 1;
00132   delete_from_list ();
00133 }


Member Function Documentation

void NML_SERVER::delete_from_list   [virtual]
 

Reimplemented from CMS_SERVER.

Definition at line 136 of file nml_srv.cc.

Referenced by ~NML_SERVER().

00137 {
00138   CMS_SERVER::delete_from_list ();
00139   if (NULL != NML_Default_Super_Server)
00140     {
00141       if (NULL != NML_Default_Super_Server->servers)
00142         {
00143           NML_Default_Super_Server->servers->
00144             delete_node (super_server_list_id);
00145         }
00146     }
00147 }

void NML_SERVER::add_to_nml_server_list  
 

Definition at line 117 of file nml_srv.cc.

Referenced by NML_SERVER().

00118 {
00119   if (NULL == NML_Default_Super_Server)
00120     {
00121       NML_Default_Super_Server = new NML_SUPER_SERVER;
00122     }
00123   if (NULL != NML_Default_Super_Server)
00124     {
00125       NML_Default_Super_Server->add_to_list (this);
00126     }
00127 }


Friends And Related Function Documentation

friend class NML_SUPER_SERVER [friend]
 

Definition at line 82 of file nml_srv.hh.


Field Documentation

int NML_SERVER::super_server_list_id [protected]
 

Definition at line 74 of file nml_srv.hh.

Referenced by NML_SUPER_SERVER::add_to_list().

int NML_SERVER::being_deleted [protected]
 

Definition at line 75 of file nml_srv.hh.


The documentation for this class was generated from the following files:
Generated on Sun Dec 2 15:58:53 2001 for rcslib by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001