/******************************************************************************/ /* File : GXschema.h */ /* Schema : bdeschema.sch */ /* GENCPP Version : Chgen V 12 - Sathya */ /******************************************************************************/ #ifndef __GXSCHEMA_H__ #define __GXSCHEMA_H__ #include "bdeschema.h" #ifdef USE_STL #include #endif /* USE_STL */ class CG ; #ifndef USE_STL class GX : public RC /* GX - graph text */ { private : hcg_key CGid; /* unique fkey of CG parent of this GX */ char DAid[9]; /* Obsolete: Unique ID of dataflow item */ float GXorigin; /* GX's offset to[from?] its predecessor ? */ char txtfont[26]; /* text font name and size */ float txtoffsetx; /* x-offset of text relative to 0?(WC?) */ float txtoffsety; /* y-offset of text relative to 0?(WC?)*/ int txtwidth; /* x-extent of label text (WC) */ int txtheight; /* y-extent of label text (WC) */ char grphcaption[121]; /* multi-line text label(text string) */ public : CG *CGid_pp; void *CGid_fpp; void *CGid_bpp; GX *prev_ptr; GX *next_ptr; void set_CGid (hcg_key id); void set_DAid (char *value); void set_GXorigin (float value); void set_txtfont (char *value); void set_txtoffsetx (float value); void set_txtoffsety (float value); void set_txtwidth (int value); void set_txtheight (int value); void set_grphcaption (char *value); hcg_key get_CGid (); char* get_DAid (); float get_GXorigin (); char* get_txtfont (); float get_txtoffsetx (); float get_txtoffsety (); int get_txtwidth (); int get_txtheight (); char* get_grphcaption (); GX* 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 GX : public RC { private : hcg_key CGid; /* unique fkey of CG parent of this GX */ char DAid[9]; /* Obsolete: Unique ID of dataflow item */ float GXorigin; /* GX's offset to[from?] its predecessor ? */ char txtfont[26]; /* text font name and size */ float txtoffsetx; /* x-offset of text relative to 0?(WC?) */ float txtoffsety; /* y-offset of text relative to 0?(WC?)*/ int txtwidth; /* x-extent of label text (WC) */ int txtheight; /* y-extent of label text (WC) */ char grphcaption[121]; /* multi-line text label(text string) */ CG *CGid_pp; /* Parent */ public : void set_CGid (hcg_key id); void set_DAid (char *value); void set_GXorigin (float value); void set_txtfont (char *value); void set_txtoffsetx (float value); void set_txtoffsety (float value); void set_txtwidth (int value); void set_txtheight (int value); void set_grphcaption (char *value); hcg_key get_CGid (); char* get_DAid (); float get_GXorigin (); char* get_txtfont (); float get_txtoffsetx (); float get_txtoffsety (); int get_txtwidth (); int get_txtheight (); char* get_grphcaption (); void setParent_CGid(CG *currentRow); /* Initializes parent */ CG *getParent_CGid(); /* 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); GX(); /* Constructor */ ~GX(); /* 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 GXtable /* GX - graph text */ { 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 */ GX *getPrevRow(GX *curr); /* Returns prev iterator */ GX *getNextRow(GX *curr); /* Returns next iterator */ GX *getLastRow(); /* Returns last iterator */ list::iterator Terminator(); /* Returns list terminator */ bool isFirstRow(GX * curr); /* True if curr is iterator to first row */ bool isLastRow(GX * curr); /* True if curr is iterator to last row */ void insertRow(GX *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); */ GXtable(char *abbrev, char *name); /* Constructor */ ~GXtable(); /* Destructor */ }; #endif /* USE_STL */ #endif /* __GXSCHEMA_H__ */