rasdaman complete source
oid.hh
Go to the documentation of this file.
1 /*
2 * This file is part of rasdaman community.
3 *
4 * Rasdaman community is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * Rasdaman community is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with rasdaman community. If not, see <http://www.gnu.org/licenses/>.
16 *
17 * Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Peter Baumann /
18 rasdaman GmbH.
19 *
20 * For more information please see <http://www.rasdaman.org>
21 * or contact Peter Baumann via <baumann@rasdaman.com>.
22 /
34 #ifndef _D_OID_
35 #define _D_OID_
36 
37 #include <iosfwd>
38 
39 //@ManMemo: Module: {\bf raslib}
40 
41 /*@Doc:
42 
43  Class \Ref{r_OId} represents an object identifier.
44 
45 */
46 
47 class r_OId
48 {
49 public:
51  r_OId();
52 
54  r_OId( const char* );
55 
57  r_OId( const char* initSystemName, const char* initBaseName, double initLocalOId );
58 
60  r_OId( const r_OId& );
61 
63  virtual ~r_OId();
64 
66  virtual void r_deactivate();
67 
69  void print_status(std::ostream& s) const;
70 
72  const r_OId& operator= ( const r_OId& );
73 
74  //@Man: Comparison operators:
76 
79  bool operator==( const r_OId& ) const;
80 
82  bool operator!=( const r_OId& ) const;
83 
85  bool operator> ( const r_OId& ) const;
86 
88  bool operator< ( const r_OId& ) const;
89 
91  bool operator>=( const r_OId& ) const;
92 
94  bool operator<=( const r_OId& ) const;
95 
97 
98 
100  inline const char* get_string_representation() const;
101 
103  inline const char* get_system_name() const;
104 
106  inline const char* get_base_name() const;
107 
109  inline double get_local_oid() const;
110 
112  inline bool is_valid() const;
113 
114 private:
116  char* oidString;
117 
119  char* systemName;
120 
122  char* baseName;
123 
125  double localOId;
126 };
127 
128 
129 
130 //@ManMemo: Module: {\bf raslib}
134 extern std::ostream& operator<<( std::ostream& s, const r_OId& oid );
135 
136 #include "raslib/oid.icc"
137 #endif
template bool operator<(const DBRef< DBMDDObj > &, const DBRef< DBMDDObj > &)
bool operator==(const OId::OIdPrimitive one, const OId &two)
template std::ostream & operator<<(const vector< KeyObject > &, std::ostream &)