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

CMS_UPDATER Class Reference

#include <cms_up.hh>

Inheritance diagram for CMS_UPDATER:

Inheritance graph
[legend]
Collaboration diagram for CMS_UPDATER:

Collaboration graph
[legend]

Public Methods

virtual CMS_STATUS update (char &x)=0
virtual CMS_STATUS update (unsigned char &x)=0
virtual CMS_STATUS update (short int &x)=0
virtual CMS_STATUS update (unsigned short int &x)=0
virtual CMS_STATUS update (int &x)=0
virtual CMS_STATUS update (unsigned int &x)=0
virtual CMS_STATUS update (long int &x)=0
virtual CMS_STATUS update (unsigned long int &x)=0
virtual CMS_STATUS update (float &x)=0
virtual CMS_STATUS update (double &x)=0
virtual CMS_STATUS update (long double &x)=0
virtual CMS_STATUS update (char *x, unsigned int len)=0
virtual CMS_STATUS update (unsigned char *x, unsigned int len)=0
virtual CMS_STATUS update (short *x, unsigned int len)=0
virtual CMS_STATUS update (unsigned short *x, unsigned int len)=0
virtual CMS_STATUS update (int *x, unsigned int len)=0
virtual CMS_STATUS update (unsigned int *x, unsigned int len)=0
virtual CMS_STATUS update (long *x, unsigned int len)=0
virtual CMS_STATUS update (unsigned long *x, unsigned int len)=0
virtual CMS_STATUS update (float *x, unsigned int len)=0
virtual CMS_STATUS update (double *x, unsigned int len)=0
virtual CMS_STATUS update (long double *x, unsigned int len)=0
virtual void rewind ()
virtual int get_encoded_msg_size ()=0
virtual int set_mode (CMS_UPDATER_MODE)
virtual CMS_UPDATER_MODE get_mode ()
virtual void set_encoded_data (void *, long _encoded_data_size)

Protected Methods

virtual int check_pointer (char RCS_HUGE *ptr, long bytes)
 CMS_UPDATER (CMS *, int create_encoded_data=1, long _neutral_size_factor=4)
virtual ~CMS_UPDATER ()

Protected Attributes

void *& encoded_data
void *& encoded_header
void *& encoded_queuing_header
CMS_STATUSstatus
long & size
long & encoded_header_size
long & encoded_queuing_header_size
int & using_external_encoded_data
int & pointer_check_disabled
long & encoded_data_size
CMS_UPDATER_MODE mode
CMScms_parent
long neutral_size_factor
int encoding

Friends

class RCS_EXPORT CMS

Constructor & Destructor Documentation

CMS_UPDATER::CMS_UPDATER CMS   _cms_parent,
int    create_encoded_data = 1,
long    _neutral_size_factor = 4
[protected]
 

Definition at line 28 of file cms_up.cc.

00029                                                     :
00030   /**********************************************
00031   * Aliases to variables in the CMS parent
00032   * using aliases lets CMS and its CMS_UPDATER share this information
00033   * more conveniently and allowed the CMS_UPDATER functions to be pulled out
00034   * of CMS with fewer changes. (WPS - 6/12/95)
00035   *********************************************/
00036 encoded_data (_cms_parent->encoded_data),
00037 encoded_header (_cms_parent->encoded_header),
00038 encoded_queuing_header (_cms_parent->encoded_queuing_header),
00039 status (_cms_parent->status),
00040 size (_cms_parent->size),
00041 encoded_header_size (_cms_parent->encoded_header_size),
00042 encoded_queuing_header_size (_cms_parent->encoded_queuing_header_size),
00043 using_external_encoded_data (_cms_parent->using_external_encoded_data),
00044 pointer_check_disabled (_cms_parent->pointer_check_disabled),
00045 encoded_data_size (_cms_parent->encoded_data_size)
00046 {
00047   cms_parent = _cms_parent;
00048   mode = CMS_NO_UPDATE;
00049   neutral_size_factor = _neutral_size_factor;
00050   if (encoded_data == NULL && create_encoded_data)
00051     {
00052       if (cms_parent->enc_max_size > 0
00053           && cms_parent->enc_max_size < neutral_size_factor * size)
00054         {
00055           set_encoded_data (DEBUG_MALLOC (cms_parent->enc_max_size),
00056                             cms_parent->enc_max_size);
00057         }
00058       else
00059         {
00060           set_encoded_data (DEBUG_MALLOC (neutral_size_factor * size),
00061                             neutral_size_factor * size);
00062         }
00063       using_external_encoded_data = 0;
00064     }
00065 }

CMS_UPDATER::~CMS_UPDATER   [protected, virtual]
 

Definition at line 67 of file cms_up.cc.

00068 {
00069 #ifdef CMS_SUPPORT_POINTERS
00070   if (NULL != ptr_table)
00071     {
00072       delete ptr_table;
00073     }
00074 #endif
00075 }


Member Function Documentation

virtual CMS_STATUS CMS_UPDATER::update char &    x [pure virtual]
 

Reimplemented in CMS_ASCII_UPDATER, CMS_DISPLAY_ASCII_UPDATER, and CMS_XDR_UPDATER.

Referenced by CMS::decode_header(), CMS::decode_queuing_header(), CMS::encode_header(), CMS::encode_queuing_header(), and CMS::update().

virtual CMS_STATUS CMS_UPDATER::update unsigned char &    x [pure virtual]
 

Reimplemented in CMS_ASCII_UPDATER, CMS_DISPLAY_ASCII_UPDATER, and CMS_XDR_UPDATER.

virtual CMS_STATUS CMS_UPDATER::update short int &    x [pure virtual]
 

Reimplemented in CMS_ASCII_UPDATER, CMS_DISPLAY_ASCII_UPDATER, and CMS_XDR_UPDATER.

virtual CMS_STATUS CMS_UPDATER::update unsigned short int &    x [pure virtual]
 

Reimplemented in CMS_ASCII_UPDATER, CMS_DISPLAY_ASCII_UPDATER, and CMS_XDR_UPDATER.

virtual CMS_STATUS CMS_UPDATER::update int &    x [pure virtual]
 

Reimplemented in CMS_ASCII_UPDATER, CMS_DISPLAY_ASCII_UPDATER, and CMS_XDR_UPDATER.

virtual CMS_STATUS CMS_UPDATER::update unsigned int &    x [pure virtual]
 

Reimplemented in CMS_ASCII_UPDATER, CMS_DISPLAY_ASCII_UPDATER, and CMS_XDR_UPDATER.

virtual CMS_STATUS CMS_UPDATER::update long int &    x [pure virtual]
 

Reimplemented in CMS_ASCII_UPDATER, CMS_DISPLAY_ASCII_UPDATER, and CMS_XDR_UPDATER.

virtual CMS_STATUS CMS_UPDATER::update unsigned long int &    x [pure virtual]
 

Reimplemented in CMS_ASCII_UPDATER, CMS_DISPLAY_ASCII_UPDATER, and CMS_XDR_UPDATER.

virtual CMS_STATUS CMS_UPDATER::update float &    x [pure virtual]
 

Reimplemented in CMS_ASCII_UPDATER, CMS_DISPLAY_ASCII_UPDATER, and CMS_XDR_UPDATER.

virtual CMS_STATUS CMS_UPDATER::update double &    x [pure virtual]
 

Reimplemented in CMS_ASCII_UPDATER, CMS_DISPLAY_ASCII_UPDATER, and CMS_XDR_UPDATER.

virtual CMS_STATUS CMS_UPDATER::update long double &    x [pure virtual]
 

Reimplemented in CMS_ASCII_UPDATER, CMS_DISPLAY_ASCII_UPDATER, and CMS_XDR_UPDATER.

virtual CMS_STATUS CMS_UPDATER::update char *    x,
unsigned int    len
[pure virtual]
 

Reimplemented in CMS_ASCII_UPDATER, CMS_DISPLAY_ASCII_UPDATER, and CMS_XDR_UPDATER.

virtual CMS_STATUS CMS_UPDATER::update unsigned char *    x,
unsigned int    len
[pure virtual]
 

Reimplemented in CMS_ASCII_UPDATER, CMS_DISPLAY_ASCII_UPDATER, and CMS_XDR_UPDATER.

virtual CMS_STATUS CMS_UPDATER::update short *    x,
unsigned int    len
[pure virtual]
 

Reimplemented in CMS_ASCII_UPDATER, CMS_DISPLAY_ASCII_UPDATER, and CMS_XDR_UPDATER.

virtual CMS_STATUS CMS_UPDATER::update unsigned short *    x,
unsigned int    len
[pure virtual]
 

Reimplemented in CMS_ASCII_UPDATER, CMS_DISPLAY_ASCII_UPDATER, and CMS_XDR_UPDATER.

virtual CMS_STATUS CMS_UPDATER::update int *    x,
unsigned int    len
[pure virtual]
 

Reimplemented in CMS_ASCII_UPDATER, CMS_DISPLAY_ASCII_UPDATER, and CMS_XDR_UPDATER.

virtual CMS_STATUS CMS_UPDATER::update unsigned int *    x,
unsigned int    len
[pure virtual]
 

Reimplemented in CMS_ASCII_UPDATER, CMS_DISPLAY_ASCII_UPDATER, and CMS_XDR_UPDATER.

virtual CMS_STATUS CMS_UPDATER::update long *    x,
unsigned int    len
[pure virtual]
 

Reimplemented in CMS_ASCII_UPDATER, CMS_DISPLAY_ASCII_UPDATER, and CMS_XDR_UPDATER.

virtual CMS_STATUS CMS_UPDATER::update unsigned long *    x,
unsigned int    len
[pure virtual]
 

Reimplemented in CMS_ASCII_UPDATER, CMS_DISPLAY_ASCII_UPDATER, and CMS_XDR_UPDATER.

virtual CMS_STATUS CMS_UPDATER::update float *    x,
unsigned int    len
[pure virtual]
 

Reimplemented in CMS_ASCII_UPDATER, CMS_DISPLAY_ASCII_UPDATER, and CMS_XDR_UPDATER.

virtual CMS_STATUS CMS_UPDATER::update double *    x,
unsigned int    len
[pure virtual]
 

Reimplemented in CMS_ASCII_UPDATER, CMS_DISPLAY_ASCII_UPDATER, and CMS_XDR_UPDATER.

virtual CMS_STATUS CMS_UPDATER::update long double *    x,
unsigned int    len
[pure virtual]
 

Reimplemented in CMS_ASCII_UPDATER, CMS_DISPLAY_ASCII_UPDATER, and CMS_XDR_UPDATER.

void CMS_UPDATER::rewind   [virtual]
 

Reimplemented in CMS_ASCII_UPDATER, CMS_DISPLAY_ASCII_UPDATER, and CMS_XDR_UPDATER.

Definition at line 181 of file cms_up.cc.

Referenced by CMS::decode_header(), CMS::decode_queuing_header(), CMS::encode_header(), CMS::encode_queuing_header(), CMS_XDR_UPDATER::rewind(), CMS_DISPLAY_ASCII_UPDATER::rewind(), CMS_ASCII_UPDATER::rewind(), and CMS::rewind().

00182 {
00183 }

virtual int CMS_UPDATER::get_encoded_msg_size   [pure virtual]
 

Reimplemented in CMS_ASCII_UPDATER, CMS_DISPLAY_ASCII_UPDATER, and CMS_XDR_UPDATER.

Referenced by CMS::encode_header(), CMS::encode_queuing_header(), and CMS::get_encoded_msg_size().

int CMS_UPDATER::set_mode CMS_UPDATER_MODE    _mode [virtual]
 

Reimplemented in CMS_ASCII_UPDATER, CMS_DISPLAY_ASCII_UPDATER, and CMS_XDR_UPDATER.

Definition at line 186 of file cms_up.cc.

Referenced by CMS::decode_header(), CMS::decode_queuing_header(), CMS::encode_header(), CMS::encode_queuing_header(), CMS_XDR_UPDATER::set_mode(), CMS_DISPLAY_ASCII_UPDATER::set_mode(), CMS_ASCII_UPDATER::set_mode(), and CMS::set_mode().

00187 {
00188   mode = _mode;
00189   switch (mode)
00190     {
00191     case CMS_NO_UPDATE:
00192       break;
00193 
00194     case CMS_ENCODE_DATA:
00195       encoding = 1;
00196       break;
00197 
00198     case CMS_DECODE_DATA:
00199       encoding = 0;
00200       break;
00201 
00202     case CMS_ENCODE_HEADER:
00203       encoding = 1;
00204       break;
00205 
00206     case CMS_DECODE_HEADER:
00207       encoding = 0;
00208       break;
00209 
00210     case CMS_ENCODE_QUEUING_HEADER:
00211       encoding = 1;
00212       break;
00213 
00214     case CMS_DECODE_QUEUING_HEADER:
00215       encoding = 0;
00216       break;
00217 
00218     default:
00219       rcs_print_error ("CMS updater in invalid mode.\n");
00220       return (-1);
00221     }
00222   return (0);
00223 }

CMS_UPDATER_MODE CMS_UPDATER::get_mode   [virtual]
 

Definition at line 226 of file cms_up.cc.

Referenced by CMS::decode_header(), CMS::decode_queuing_header(), CMS::encode_header(), and CMS::encode_queuing_header().

00227 {
00228   return mode;
00229 }

void CMS_UPDATER::set_encoded_data void *    _encoded_data,
long    _encoded_data_size
[virtual]
 

Reimplemented in CMS_XDR_UPDATER.

Definition at line 243 of file cms_up.cc.

Referenced by CMS_UPDATER(), and CMS::set_encoded_data().

00244 {
00245   if (NULL != encoded_data &&
00246       !using_external_encoded_data && encoded_data != _encoded_data)
00247     {
00248       DEBUG_FREE (encoded_data);
00249       encoded_data = NULL;
00250     }
00251   encoded_data = _encoded_data;
00252   encoded_data_size = _encoded_data_size;
00253   using_external_encoded_data = 1;
00254 }

int CMS_UPDATER::check_pointer char RCS_HUGE *    _pointer,
long    _bytes
[protected, virtual]
 

Reimplemented in CMS_ASCII_UPDATER, CMS_DISPLAY_ASCII_UPDATER, and CMS_XDR_UPDATER.

Definition at line 233 of file cms_up.cc.

00234 {
00235   if (NULL == cms_parent)
00236     {
00237       return (-1);
00238     }
00239   return (cms_parent->check_pointer (_pointer, _bytes));
00240 }


Friends And Related Function Documentation

friend class RCS_EXPORT CMS [friend]
 

Reimplemented in CMS_ASCII_UPDATER, CMS_DISPLAY_ASCII_UPDATER, and CMS_XDR_UPDATER.

Definition at line 111 of file cms_up.hh.


Field Documentation

void* & CMS_UPDATER::encoded_data [protected]
 

Definition at line 78 of file cms_up.hh.

void* & CMS_UPDATER::encoded_header [protected]
 

Definition at line 79 of file cms_up.hh.

void* & CMS_UPDATER::encoded_queuing_header [protected]
 

Definition at line 80 of file cms_up.hh.

CMS_STATUS& CMS_UPDATER::status [protected]
 

Definition at line 81 of file cms_up.hh.

long& CMS_UPDATER::size [protected]
 

Definition at line 82 of file cms_up.hh.

long& CMS_UPDATER::encoded_header_size [protected]
 

Definition at line 83 of file cms_up.hh.

long& CMS_UPDATER::encoded_queuing_header_size [protected]
 

Definition at line 84 of file cms_up.hh.

int& CMS_UPDATER::using_external_encoded_data [protected]
 

Definition at line 85 of file cms_up.hh.

int& CMS_UPDATER::pointer_check_disabled [protected]
 

Definition at line 86 of file cms_up.hh.

long& CMS_UPDATER::encoded_data_size [protected]
 

Definition at line 87 of file cms_up.hh.

CMS_UPDATER_MODE CMS_UPDATER::mode [protected]
 

Definition at line 90 of file cms_up.hh.

CMS* CMS_UPDATER::cms_parent [protected]
 

Definition at line 91 of file cms_up.hh.

long CMS_UPDATER::neutral_size_factor [protected]
 

Definition at line 97 of file cms_up.hh.

Referenced by CMS::open().

int CMS_UPDATER::encoding [protected]
 

Reimplemented in CMS_DISPLAY_ASCII_UPDATER.

Definition at line 108 of file cms_up.hh.


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