/******************************************************************************/ /* File : HGschema.h */ /* Schema : bdeschema.sch */ /* GENCPP Version : Chgen V 12 - Sathya */ /******************************************************************************/ #ifndef __HGSCHEMA_H__ #define __HGSCHEMA_H__ #include "bdeschema.h" #ifdef USE_STL #include #endif /* USE_STL */ class CG ; class HN ; #ifndef USE_STL class HG : public RC /* (Obsolete term DFD): single diagram with multiple nodes */ { private : char FSid[9]; /* fkey to attribs of file containing diagram */ char HNid[9]; /* Obsolete: >1 node may have this expansion */ char HGauthor[13]; /* the username of the [latest?] human editor */ char HGcreated[13]; /* date-time when first created */ char HGlastmod[13]; /* date-time when last modified */ char HGtitle[61]; /* title for this diagram */ public : CG *CGid_fcp; CG *CGid_bcp; HN *HNid_fcp; HN *HNid_bcp; HG *prev_ptr; HG *next_ptr; void set_FSid (char *value); void set_HNid (char *value); void set_HGauthor (char *value); void set_HGcreated (char *value); void set_HGlastmod (char *value); void set_HGtitle (char *value); char* get_FSid (); char* get_HNid (); char* get_HGauthor (); char* get_HGcreated (); char* get_HGlastmod (); char* get_HGtitle (); HG* create_row(); void link_row () ; void parse_row (char *buffer, int idx, hcg_key hcg_k) ; void add_row (char *viewname) ; void delete_row () ; void dump_table (char *viewname, char *file_name, int new_version, char *modestr) ; void dump_row (char *viewname, char *file_name, int new_version, char *modestr) ; void add_row_log(char *); void log_do_add_row (char *, char *, int); void log_do_set_int_row (const char *, const int ); void log_do_set_flt_row (const char *, const int ); void log_do_set_key_row (const char *, hcg_key ); void log_do_set_str_row (const char *, const char * ); } ; #else class HG : public RC { private : char FSid[9]; /* fkey to attribs of file containing diagram */ char HNid[9]; /* Obsolete: >1 node may have this expansion */ char HGauthor[13]; /* the username of the [latest?] human editor */ char HGcreated[13]; /* date-time when first created */ char HGlastmod[13]; /* date-time when last modified */ char HGtitle[61]; /* title for this diagram */ list CGid_children; /* Child list */ list HNid_children; /* Child list */ public : void set_FSid (char *value); void set_HNid (char *value); void set_HGauthor (char *value); void set_HGcreated (char *value); void set_HGlastmod (char *value); void set_HGtitle (char *value); char* get_FSid (); char* get_HNid (); char* get_HGauthor (); char* get_HGcreated (); char* get_HGlastmod (); char* get_HGtitle (); void insertChild_CGid(CG *childRow); /* Adds a child to list */ void removeChild_CGid(list::iterator rowIter); /* Remove child */ list::iterator getFirstChild_CGid(); /* Returns 1st child */ list::iterator getLastChild_CGid(); /* Returns last child */ list::iterator CGid_Terminator(); /* Returns terminator */ void insertChild_HNid(HN *childRow); /* Adds a child to list */ void removeChild_HNid(list::iterator rowIter); /* Remove child */ list::iterator getFirstChild_HNid(); /* Returns 1st child */ list::iterator getLastChild_HNid(); /* Returns last child */ list::iterator HNid_Terminator(); /* Returns terminator */ void link_row () ; void parse_row (char *buffer, int idx, hcg_key hcg_k); void add_row (char *viewname); list::iterator delete_row (list::iterator rowIter); /* Deletes the row */ /* Prints a row to a file */ void dump_row (char *viewname, char *file_name, int new_version, char *modestr); /* Prints a row to terminal */ void dump_row (char *viewname, int new_version, char *modestr); HG(); /* Constructor */ ~HG(); /* Destructor */ void add_row_log(char *); void log_do_add_row (char *, char *, int); void log_do_set_int_row (const char *, const int ); void log_do_set_flt_row (const char *, const int ); void log_do_set_key_row (const char *, hcg_key ); void log_do_set_str_row (const char *, const char * ); } ; class HGtable /* (Obsolete term DFD): single diagram with multiple nodes */ { private : char abbrev[5]; /* 2-char abbreviation */ char *name; /* Table name */ list row; /* List of rows */ public : char *getAbbrev(); /* Returns table abbreviation */ char *getName(); /* Returns table name */ unsigned int getRowCount(); /* Returns number of rows in table */ list::iterator getFirstRow(); /* Returns iterator to first row */ HG *getPrevRow(HG *curr); /* Returns prev iterator */ HG *getNextRow(HG *curr); /* Returns next iterator */ HG *getLastRow(); /* Returns last iterator */ list::iterator Terminator(); /* Returns list terminator */ bool isFirstRow(HG * curr); /* True if curr is iterator to first row */ bool isLastRow(HG * curr); /* True if curr is iterator to last row */ void insertRow(HG *newRow); /* Inserts a row at end of table */ list::iterator removeRow(list::iterator i); /* Removes row from table */ /* Prints out entire table to file */ void dump_table(char *viewname, char *file_name, int new_version, char *modestr); /* Prints out entire table to terminal */ /* void dump_table(char *viewname, int new_version, char *modestr); */ HGtable(char *abbrev, char *name); /* Constructor */ ~HGtable(); /* Destructor */ }; #endif /* USE_STL */ #endif /* __HGSCHEMA_H__ */