#ifndef _CDEV_REDIRECTOR_DEFINITION_H_ #define _CDEV_REDIRECTOR_DEFINITION_H_ #ifndef _CDEV_DIRECTORY_TABLE_H_ #error "You must include cdevDirectoryTable.h to load cdevRedirectorDefinition.h" #endif #include // ***************************************************************************** // * class cdevRedirectorDefinition : // * This class is used to store the information that identifies the // * service and service data that is associated with a specific message. // * This class is only instanciated in a cdevClassDefinition that has // * been instanciated. // * // * To reduce the number of copies of extraneous data, this class will // * use the service data that is stored in the cdevElementDefinition. // ***************************************************************************** class cdevRedirectorDefinition { private: char * name; cdevServiceDefinition * service; char ** serviceData; int nItems; public: inline cdevRedirectorDefinition ( char *Name, cdevElementDefinition &def); inline ~cdevRedirectorDefinition ( void ); inline void asciiDump ( FILE * fp = stdout ); // ********************************************************************* // * Member access methods // ********************************************************************* inline char * getName ( void ); inline cdevServiceDefinition * getService ( void ); inline char ** getServiceData ( void ); inline int getDataCnt ( void ); }; // ***************************************************************************** // * cdevRedirectorDefinition::cdevRedirectorDefinition : // * This is the constructor for the cdevRedirectorDefinition class... The // * message parameter becomes the property of the class and should not // * be accessed again by the caller... // ***************************************************************************** inline cdevRedirectorDefinition::cdevRedirectorDefinition ( char *Name, cdevElementDefinition &def) : name (Name), service (def.getService()), serviceData(def.getServiceData()), nItems (def.getDataCnt()) { } // ***************************************************************************** // * cdevRedirectorDefinition::~cdevRedirectorDefinition : // * This is the destructor for the cdevRedirectorDefinition object. // ***************************************************************************** inline cdevRedirectorDefinition::~cdevRedirectorDefinition ( void ) { delete name; } // ***************************************************************************** // * cdevRedirectorDefinition::asciiDump : // * This is a diagnostic method that allows the caller to dump the contents // * of the class redirection table that identifies which service will // * be used for each message. // ***************************************************************************** inline void cdevRedirectorDefinition::asciiDump ( FILE * fp ) { fprintf(fp, "\t\t\"%s\" %s", name, service->getName()); if(serviceData!=NULL && nItems>0) { fprintf(fp, " {"); for(int i=0; i