Main Page Class Hierarchy Compound List File List Compound Members

# Resource.h

    00001 #ifndef RESOURCE_H
    00002 #define RESOURCE_H
    00003
    00004 #include "global.h"
    00005 #include "Info.h"
    00006 #include "Coosys.h"
    00007 #include "Param.h"
    00008 #include "Link.h"
    00009 #include "VTable.h"
    00010
    00011
    00012 #include <vector>
    00013 using namespace std;
    00014
    00024 //Date created - 27 May 2002
    00025
    00026 class Resource {
    00027
    00028         public:
    00032                 Resource();
    00033
    00037                 ~Resource();
    00038
    00042                 Resource operator=(const Resource &r);
    00043
    00047                 Resource(const Resource &r);
    00048
    00064                 Resource(const char * filename,
    00065                         const char * xpath, int iomode, int * status);
    00066
    00067                 int setDesc(char * infoValue, int * status);
    00068                 int setID(char * str, int *status);
    00069                 int setName(char * str, int *status);
    00070                 int setType(resource_type t, int *status);
    00071
    00072                 int setInfos(vector <Info> infoList, int * status);
    00073                 int setCoosystems(vector <Coosys> infoList, int * status);
    00074                 int setParams(vector <Param> infoList, int * status);
    00075                 int setLinks(vector <Link> infoList, int * status);
    00076                 int setTables(vector <VTable> infoList, int * status);
    00077                 int setResources(vector <Resource> infoList, int * status);
    00078
    00095                 int openFile(const char * filename,
    00096                         const char * xpath, int iomode, int * status);
    00097
    00101                 int closeFile(int *status);
    00102
    00106                 int getDescription(char * &desc, int * status);
    00107
    00111                 int getID(char * &ID, int * status);
    00112
    00116                 int getName(char * &name, int * status);
    00117
    00121                 int getType(resource_type &value, int * status);
    00122
    00126                 int getNumOfInfos(int &numOfElements, int * status);
    00127
    00132                 int getInfo(Info &info, int index, int * status);
    00133
    00137                 int getNumOfCoosys(int &numOfElements, int * status);
    00138
    00143                 int getCoosys(Coosys &coosys, int index, int * status);
    00144
    00148                 int getNumOfParams(int &numOfElements, int * status);
    00149
    00154                 int getParam(Param &param, int index, int * status);
    00155
    00159                 int getNumOfLinks(int &numOfElements, int * status);
    00160
    00165                 int getLink(Link &link, int index, int * status);
    00166
    00170                 int getNumOfTables(int &numOfElements, int * status);
    00171
    00176                 int getTable(VTable &table, int index, int * status);
    00177
    00181                 int getNumOfResources(int &numOfElements, int * status);
    00182
    00187                 int getResource(Resource &resource, int index, int * status);
    00188
    00189
    00190         private:
    00191                 // SONALI - change variable names to m_
    00192                 char * m_desc;
    00193                 char * m_ID;
    00194                 char * m_name;
    00195                 resource_type m_type;
    00196
    00197                 vector <Info> m_infoList;
    00198                 vector <Coosys> m_coosysList;
    00199                 vector <Param> m_paramList;
    00200                 vector <Link> m_linkList;
    00201                 vector <VTable> m_vtableList;
    00202                 vector <Resource> m_resourceList;
    00203
    00204                 void cleanup();
    00205                 void makecopy(const Resource &r);
    00206                 void init(void);
    00207
    00208 };
    00209
    00210 #endif