3 * Interface to 'abstract' class structure. */
12 struct registered_structure_info {
16 /** The class structure is used to implement user defined classes
17 with named members which behave similar to ordinary C structs.
18 structure is an 'abstract' base class (it is possible but not
19 meaningful to make instances), the user defined structures
20 will be create by the perl script structure.pl */
22 class structure : public basic
26 // default constructor, destructor, copy constructor assignment operator and helpers
30 structure(structure const & other);
31 structure const & operator=(structure const & other);
33 void copy(structure const & other);
34 void destroy(bool call_parent);
39 // functions overriding virtual functions from bases classes
41 basic * duplicate() const;
42 void printraw(ostream & os) const;
43 void print(ostream & os, unsigned upper_precedence=0) const;
44 void printtree(ostream & os, unsigned indent) const;
45 void printcsrc(ostream & os, unsigned type, unsigned upper_precedence=0) const;
47 int compare_same_type(basic const & other) const;
48 bool is_equal_same_type(basic const & other) const;
50 // new virtual functions which can be overridden by derived classes
53 // non-virtual functions in this class
55 static vector<registered_structure_info> & registered_structures(void);
57 static unsigned register_new(char const * nm);
66 extern const structure some_structure;
67 extern type_info const & typeid_structure;
69 #endif // ndef _STRUCTURE_H_