/******************************************************************************/ /* File : CGschema.h */ /* Schema : bdeschema.sch */ /* GENCPP Version : Chgen V 12 - Sathya */ /******************************************************************************/ #ifndef __CGSCHEMA_H__ #define __CGSCHEMA_H__ #include "bdeschema.h" #ifdef USE_STL #include #endif /* USE_STL */ class HG ; class GX ; #ifndef USE_STL class CG : public RC /* CG - graph caption (e.g., text for entire graph) */ { private : hcg_key HGid; /* unique ID of horzgraph container */ float CGcenterx; /* x coordinate of caption center in WC */ float CGcentery; /* y coordinate of caption center in WC */ float CGwidth; /* width of graph caption area */ float CGheight; /* height of graph caption area */ public : HG *HGid_pp; void *HGid_fpp; void *HGid_bpp; GX *GXid_fcp; GX *GXid_bcp; CG *prev_ptr; CG *next_ptr; void set_HGid (hcg_key id); void set_CGcenterx (float value); void set_CGcentery (float value); void set_CGwidth (float value); void set_CGheight (float value); hcg_key get_HGid (); float get_CGcenterx (); float get_CGcentery (); float get_CGwidth (); float get_CGheight (); CG* 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 CG : public RC { private : hcg_key HGid; /* unique ID of horzgraph container */ float CGcenterx; /* x coordinate of caption center in WC */ float CGcentery; /* y coordinate of caption center in WC */ float CGwidth; /* width of graph caption area */ float CGheight; /* height of graph caption area */ HG *HGid_pp; /* Parent */ list GXid_children; /* Child list */ public : void set_HGid (hcg_key id); void set_CGcenterx (float value); void set_CGcentery (float value); void set_CGwidth (float value); void set_CGheight (float value); hcg_key get_HGid (); float get_CGcenterx (); float get_CGcentery (); float get_CGwidth (); float get_CGheight (); void insertChild_GXid(GX *childRow); /* Adds a child to list */ void removeChild_GXid(list::iterator rowIter); /* Remove child */ list::iterator getFirstChild_GXid(); /* Returns 1st child */ list::iterator getLastChild_GXid(); /* Returns last child */ list::iterator GXid_Terminator(); /* Returns terminator */ void setParent_HGid(HG *currentRow); /* Initializes parent */ HG *getParent_HGid(); /* Returns parent */ 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); CG(); /* Constructor */ ~CG(); /* 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 CGtable /* CG - graph caption (e.g., text for entire graph) */ { 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 */ CG *getPrevRow(CG *curr); /* Returns prev iterator */ CG *getNextRow(CG *curr); /* Returns next iterator */ CG *getLastRow(); /* Returns last iterator */ list::iterator Terminator(); /* Returns list terminator */ bool isFirstRow(CG * curr); /* True if curr is iterator to first row */ bool isLastRow(CG * curr); /* True if curr is iterator to last row */ void insertRow(CG *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); */ CGtable(char *abbrev, char *name); /* Constructor */ ~CGtable(); /* Destructor */ }; #endif /* USE_STL */ #endif /* __CGSCHEMA_H__ */