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

cmd_msg.cc

Go to the documentation of this file.
00001 
00002 
00003 #include "rcs_defs.hh"
00004 
00005 #ifndef NO_STDIO
00006 #ifdef EXTERN_C_STD_HEADERS
00007 extern "C"
00008 {
00009 #endif
00010 #include <stdio.h>
00011 #ifdef EXTERN_C_STD_HEADERS
00012 }
00013 #endif
00014 #endif
00015 
00016 #include "nml.hh"
00017 #include "nmlmsg.hh"
00018 #include "cms.hh"
00019 
00020 NMLTYPE nmltype;
00021 
00022 #include "cmd_msg.hh"
00023 
00024 RCS_CMD_MSG::RCS_CMD_MSG (NMLTYPE t, long sz):
00025 NMLmsg (t, sz)
00026 {
00027   serial_number = 0;
00028 }
00029 
00030 int
00031 RCS_CMD_MSG_format (NMLTYPE t, void RCS_FAR * buf, CMS RCS_FAR * cms)
00032 {
00033   cms->update (((RCS_CMD_MSG *) buf)->serial_number);
00034 
00035 //  printf(" RCS_CMD_MSG_format: called.\n");
00036   switch (t)
00037     {
00038     case RCS_GENERIC_CMD_TYPE:
00039       ((RCS_GENERIC_CMD *) buf)->update (cms);
00040       return (1);
00041 
00042     default:
00043       return (0);
00044     }
00045   return (0);
00046 }
00047 
00048 RCS_GENERIC_CMD::RCS_GENERIC_CMD ():
00049 RCS_CMD_MSG (RCS_GENERIC_CMD_TYPE, sizeof (RCS_GENERIC_CMD))
00050 {
00051 // Just avoiding an inline function.
00052 }
00053 
00054 void
00055 RCS_GENERIC_CMD::update (CMS * cms)
00056 {
00057   cms->update (gen_id);
00058 }
00059 
00060 
00061 RCS_CMD_CHANNEL::RCS_CMD_CHANNEL (NML_FORMAT_PTR f_ptr, char *name,
00062                                   char *process, char *file,
00063                                   int set_to_server):
00064 NML (name, process, file, set_to_server)
00065 {
00066   format_chain = new RCS_LINKED_LIST;
00067   prefix_format_chain (f_ptr);
00068   prefix_format_chain (RCS_CMD_MSG_format);
00069   channel_type = RCS_CMD_CHANNEL_TYPE;
00070   sizeof_message_header = sizeof (RCS_CMD_MSG);
00071 
00072   if (NULL != cms)
00073     {
00074       cms->sizeof_message_header = sizeof_message_header;
00075     }
00076 
00077   register_with_server ();
00078 
00079 }
00080 
00081 RCS_CMD_CHANNEL::~RCS_CMD_CHANNEL ()
00082 {
00083   // Something funny happens to gdb without this being explicitly defined.
00084 }

Generated on Sun Dec 2 15:56:48 2001 for rcslib by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001