Go to the documentation of this file.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
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 #ifndef __MMDB_UDData__
00043 #define __MMDB_UDData__
00044
00045 #include "mmdb_mask.h"
00046
00047 namespace mmdb {
00048
00049
00050
00051 enum UDR_TYPE {
00052 UDR_ATOM = 0,
00053 UDR_RESIDUE = 1,
00054 UDR_CHAIN = 2,
00055 UDR_MODEL = 3,
00056 UDR_HIERARCHY = 4
00057 };
00058
00059 enum UDD_FLAG {
00060 UDRF_ATOM = 0x01000000,
00061 UDRF_RESIDUE = 0x02000000,
00062 UDRF_CHAIN = 0x04000000,
00063 UDRF_MODEL = 0x08000000,
00064 UDRF_HIERARCHY = 0x10000000,
00065 UDRF_MASK = 0x00FFFFFF
00066 };
00067
00068 DefineClass(UDRegister);
00069 DefineStreamFunctions(UDRegister);
00070
00071 class UDRegister : public io::Stream {
00072
00073 public :
00074
00075 UDRegister ();
00076 UDRegister ( io::RPStream Object );
00077 ~UDRegister();
00078
00079 int RegisterUDInteger ( UDR_TYPE udr_type, cpstr UDDataID );
00080 int RegisterUDReal ( UDR_TYPE udr_type, cpstr UDDataID );
00081 int RegisterUDString ( UDR_TYPE udr_type, cpstr UDDataID );
00082 int GetUDDHandle ( UDR_TYPE udr_type, cpstr UDDataID );
00083
00084 void write ( io::RFile f );
00085 void read ( io::RFile f );
00086
00087 protected :
00088 int nIUDR[5],nRUDR[5],nSUDR[5];
00089 psvector IUDRegister[5];
00090 psvector RUDRegister[5];
00091 psvector SUDRegister[5];
00092
00093 void InitUDRegister ();
00094 void FreeUDRegister ();
00095 int RegisterUDData ( psvector & UDRegister,
00096 int & nUDR,
00097 cpstr UDDataID );
00098
00099 };
00100
00101
00102
00103
00104 enum UDDATA_RC {
00105 UDDATA_Ok = 0,
00106 UDDATA_WrongHandle = -1,
00107 UDDATA_WrongUDRType = -2,
00108 UDDATA_NoData = -3
00109 };
00110
00111 DefineClass(UDData);
00112 DefineStreamFunctions(UDData);
00113
00114 class UDData : public Mask {
00115
00116 friend class SelManager;
00117
00118 public :
00119
00120 UDData ();
00121 UDData ( io::RPStream Object );
00122 ~UDData();
00123
00124 protected :
00125 ivector IUData;
00126 rvector RUData;
00127 psvector SUData;
00128
00129 void InitUDData ();
00130 void FreeUDDMemory();
00131 int getNofIUData ();
00132 int getNofRUData ();
00133 int getNofSUData ();
00134 void setNofSUData ( int newN );
00135
00136 int putUDData ( int UDDhandle, int iudd );
00137 int putUDData ( int UDDhandle, realtype rudd );
00138 int putUDData ( int UDDhandle, cpstr sudd );
00139
00140 int getUDData ( int UDDhandle, int & iudd );
00141 int getUDData ( int UDDhandle, realtype & rudd );
00142 int getUDData ( int UDDhandle, pstr sudd, int maxLen );
00143 pstr getUDData ( int UDDhandle, int * retcode=NULL );
00144 int getUDData ( int UDDhandle, pstr & sudd );
00145
00146 void write ( io::RFile f );
00147 void read ( io::RFile f );
00148
00149 };
00150
00151 }
00152
00153 #endif
00154