00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef _OBJ_ID_H
00011 #define _OBJ_ID_H
00012
00013 #include "Id.h"
00014
00020 class ObjId
00021 {
00022 friend ostream& operator <<( ostream& s, const ObjId& i );
00023 friend istream& operator >>( istream& s, ObjId& i );
00024 public:
00026
00028
00031 ObjId()
00032 : id(), dataIndex( 0 ), fieldIndex( 0 )
00033 {;}
00034
00038 ObjId( Id i, unsigned int d, unsigned int f = 0 )
00039 : id( i ), dataIndex( d ), fieldIndex( f )
00040 {;}
00041
00042 ObjId( Id i )
00043 : id( i ), dataIndex( 0 ), fieldIndex( 0 )
00044 {;}
00045
00050 ObjId( const string& path );
00051
00055 string path() const;
00056
00060 Eref eref() const;
00061
00065 bool operator==( const ObjId& other ) const;
00066 bool operator!=( const ObjId& other ) const;
00067
00071 bool operator<( const ObjId& other ) const;
00072
00077 bool isDataHere() const;
00078
00080 bool isGlobal() const;
00081
00083 bool isOffNode() const;
00084
00088 char* data() const;
00089
00093 Element* element() const;
00094
00098 Id id;
00099 unsigned int dataIndex;
00100 unsigned int fieldIndex;
00101
00108 bool bad() const;
00109
00110 private:
00111 };
00112
00113 #endif // _OBJ_ID_H