00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef _constructor_h
00027 #define _constructor_h 1
00028
00029
00030 #include <vector>
00031
00032 #ifndef _basetype_h
00033 #include "BaseType.h"
00034 #endif
00035
00037 class Constructor: public BaseType
00038 {
00039 private:
00040 Constructor();
00041 BaseType *find_hdf4_dimension_attribute_home(AttrTable::entry *source);
00042
00043 protected:
00044 std::vector<BaseType *> _vars;
00045
00046 void _duplicate(const Constructor &s);
00047 virtual AttrTable *find_matching_container(AttrTable::entry *source,
00048 BaseType **dest_variable);
00049
00050 public:
00051 typedef std::vector<BaseType *>::const_iterator Vars_citer ;
00052 typedef std::vector<BaseType *>::iterator Vars_iter ;
00053 typedef std::vector<BaseType *>::reverse_iterator Vars_riter ;
00054
00055 Constructor(const string &n, const Type &t);
00056
00057 Constructor(const Constructor ©_from);
00058 virtual ~Constructor();
00059
00060 Constructor &operator=(const Constructor &rhs);
00061 virtual void transfer_attributes(AttrTable::entry *entry);
00062
00063 Vars_iter var_begin();
00064 Vars_iter var_end();
00065 Vars_riter var_rbegin();
00066 Vars_riter var_rend();
00067 Vars_iter get_vars_iter(int i);
00068 BaseType *get_var_index(int i);
00069
00070 virtual bool is_linear();
00071
00072 virtual void print_decl(FILE *out, string space = " ",
00073 bool print_semi = true,
00074 bool constraint_info = false,
00075 bool constrained = false);
00076 virtual void print_decl(ostream &out, string space = " ",
00077 bool print_semi = true,
00078 bool constraint_info = false,
00079 bool constrained = false);
00080
00081 virtual void print_xml(FILE *out, string space = " ",
00082 bool constrained = false);
00083 virtual void print_xml(ostream &out, string space = " ",
00084 bool constrained = false);
00085
00086 virtual void dump(ostream &strm) const ;
00087 };
00088
00089 #endif // _constructor_h