/******************************************************************************/ /* File : GDschema.h */ /* Schema : bdeschema.sch */ /* GENCPP Version : Chgen V 12 - Sathya */ /******************************************************************************/ #ifndef __GDSCHEMA_H__ #define __GDSCHEMA_H__ #include "bdeschema.h" #ifdef USE_STL #include #endif /* USE_STL */ #ifndef USE_STL class GD : public RC /* GD contains default style attributes for HN,HL,HI */ { private : char shape[11]; /* circ;rect;rndrect;input;output;buffer;file */ float width; /* width (major axis) of rectangle (ellipse) */ float height; /* height (minor axis) of rectangle (ellipse) */ char hsegpattern[5]; /* default link pattern (S=solid, D=dashed) */ char txtfont[26]; /* text font name (including size) */ char location[11]; /* (Obsolete?) vert. location (top or btm) */ char justify[11]; /* horiz. justification (left, right, center */ float gcwidth; /* graph caption width (WC) */ float gcheight; /* graph caption height (WC) */ public : GD *prev_ptr; GD *next_ptr; void set_shape (char *value); void set_width (float value); void set_height (float value); void set_hsegpattern (char *value); void set_txtfont (char *value); void set_location (char *value); void set_justify (char *value); void set_gcwidth (float value); void set_gcheight (float value); char* get_shape (); float get_width (); float get_height (); char* get_hsegpattern (); char* get_txtfont (); char* get_location (); char* get_justify (); float get_gcwidth (); float get_gcheight (); GD* 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 GD : public RC { private : char shape[11]; /* circ;rect;rndrect;input;output;buffer;file */ float width; /* width (major axis) of rectangle (ellipse) */ float height; /* height (minor axis) of rectangle (ellipse) */ char hsegpattern[5]; /* default link pattern (S=solid, D=dashed) */ char txtfont[26]; /* text font name (including size) */ char location[11]; /* (Obsolete?) vert. location (top or btm) */ char justify[11]; /* horiz. justification (left, right, center */ float gcwidth; /* graph caption width (WC) */ float gcheight; /* graph caption height (WC) */ public : void set_shape (char *value); void set_width (float value); void set_height (float value); void set_hsegpattern (char *value); void set_txtfont (char *value); void set_location (char *value); void set_justify (char *value); void set_gcwidth (float value); void set_gcheight (float value); char* get_shape (); float get_width (); float get_height (); char* get_hsegpattern (); char* get_txtfont (); char* get_location (); char* get_justify (); float get_gcwidth (); float get_gcheight (); 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); GD(); /* Constructor */ ~GD(); /* 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 GDtable /* GD contains default style attributes for HN,HL,HI */ { 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 */ GD *getPrevRow(GD *curr); /* Returns prev iterator */ GD *getNextRow(GD *curr); /* Returns next iterator */ GD *getLastRow(); /* Returns last iterator */ list::iterator Terminator(); /* Returns list terminator */ bool isFirstRow(GD * curr); /* True if curr is iterator to first row */ bool isLastRow(GD * curr); /* True if curr is iterator to last row */ void insertRow(GD *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); */ GDtable(char *abbrev, char *name); /* Constructor */ ~GDtable(); /* Destructor */ }; #endif /* USE_STL */ #endif /* __GDSCHEMA_H__ */