/******************************************************************************/ /* File : HAschema.h */ /* Schema : bdeschema.sch */ /* GENCPP Version : Chgen V 12 - Sathya */ /******************************************************************************/ #ifndef __HASCHEMA_H__ #define __HASCHEMA_H__ #include "bdeschema.h" #ifdef USE_STL #include #endif /* USE_STL */ class HN ; #ifndef USE_STL class HA : public RC /* HA - Node attribute (e.g., field declaration in ERD diagram type */ { private : hcg_key HNid; /* unique ID of parent (container) node */ char DAid[9]; /* (Obsolete): Unique ID of data flow on link */ float txtoffsetx; /* x-offset from predecessor HA or nodename (WC) */ float txtoffsety; /* y-offset from predecessor HA or HN (WC)*/ float HAorigin; /* HA's offset to the last [?] [ Obsolete?]*/ int txtwidth; /* x-extent of label text in WC */ int txtheight; /* y-extent of label text in WC */ char txtfont[26]; /* Menu-style text font name and size) */ char hlabel[61]; /* node attrib text - Rev 96/7/1-RJL*/ public : HN *HNid_pp; void *HNid_fpp; void *HNid_bpp; HA *prev_ptr; HA *next_ptr; void set_HNid (hcg_key id); void set_DAid (char *value); void set_txtoffsetx (float value); void set_txtoffsety (float value); void set_HAorigin (float value); void set_txtwidth (int value); void set_txtheight (int value); void set_txtfont (char *value); void set_hlabel (char *value); hcg_key get_HNid (); char* get_DAid (); float get_txtoffsetx (); float get_txtoffsety (); float get_HAorigin (); int get_txtwidth (); int get_txtheight (); char* get_txtfont (); char* get_hlabel (); HA* 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 HA : public RC { private : hcg_key HNid; /* unique ID of parent (container) node */ char DAid[9]; /* (Obsolete): Unique ID of data flow on link */ float txtoffsetx; /* x-offset from predecessor HA or nodename (WC) */ float txtoffsety; /* y-offset from predecessor HA or HN (WC)*/ float HAorigin; /* HA's offset to the last [?] [ Obsolete?]*/ int txtwidth; /* x-extent of label text in WC */ int txtheight; /* y-extent of label text in WC */ char txtfont[26]; /* Menu-style text font name and size) */ char hlabel[61]; /* node attrib text - Rev 96/7/1-RJL*/ HN *HNid_pp; /* Parent */ public : void set_HNid (hcg_key id); void set_DAid (char *value); void set_txtoffsetx (float value); void set_txtoffsety (float value); void set_HAorigin (float value); void set_txtwidth (int value); void set_txtheight (int value); void set_txtfont (char *value); void set_hlabel (char *value); hcg_key get_HNid (); char* get_DAid (); float get_txtoffsetx (); float get_txtoffsety (); float get_HAorigin (); int get_txtwidth (); int get_txtheight (); char* get_txtfont (); char* get_hlabel (); void setParent_HNid(HN *currentRow); /* Initializes parent */ HN *getParent_HNid(); /* 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); HA(); /* Constructor */ ~HA(); /* 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 HAtable /* HA - Node attribute (e.g., field declaration in ERD diagram type */ { 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 */ HA *getPrevRow(HA *curr); /* Returns prev iterator */ HA *getNextRow(HA *curr); /* Returns next iterator */ HA *getLastRow(); /* Returns last iterator */ list::iterator Terminator(); /* Returns list terminator */ bool isFirstRow(HA * curr); /* True if curr is iterator to first row */ bool isLastRow(HA * curr); /* True if curr is iterator to last row */ void insertRow(HA *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); */ HAtable(char *abbrev, char *name); /* Constructor */ ~HAtable(); /* Destructor */ }; #endif /* USE_STL */ #endif /* __HASCHEMA_H__ */