rasdaman client API  10.6.3
The Array Analytics Engine: Datacubes at Your Fingertips
attribute.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 */
23 
24 #ifndef _D_ATTRIBUTE_
25 #define _D_ATTRIBUTE_
26 
27 #include "raslib/property.hh"
28 #include "raslib/odmgtypes.hh"
29 #include "raslib/mddtypes.hh"
30 
31 class r_Base_Type;
32 
40 //@ManMemo: Module: {\bf raslib}
41 
46 class r_Attribute : public r_Property
47 {
48 public:
51  r_Attribute();
52 
54  r_Attribute(const char *newTypeName, const r_Base_Type &newType);
55 
57  r_Attribute(const r_Attribute &oldObj);
58 
60  const r_Attribute &operator=(const r_Attribute &oldObj);
61 
63  ~r_Attribute() override;
64 
66  r_Bytes offset() const;
67 
69  void set_offset(r_Bytes newOffset);
70 
72  r_Bytes global_offset() const;
73 
75  void set_global_offset(r_Bytes newOffset);
76 
78  virtual void print_status(std::ostream &s) const override;
79 
82  r_Attribute operator[](unsigned int number) const;
83 
84  //@Man: Type-safe value access methods. In case of type mismatch, an exception is raised.
86  r_Boolean get_boolean(const char *cell) const;
88 
90  r_Char get_char(const char *cell) const;
91 
93  r_Octet get_octet(const char *cell) const;
94 
96  r_Short get_short(const char *cell) const;
97 
99  r_UShort get_ushort(const char *cell) const;
100 
102  r_Long get_long(const char *cell) const;
103 
105  r_ULong get_ulong(const char *cell) const;
106 
108  r_Float get_float(const char *cell) const;
109 
111  r_Double get_double(const char *cell) const;
112 
114 
115 
116 protected:
119 
122 };
123 
124 //@Doc: write the status of a attribute to a stream
125 extern std::ostream &operator<<(std::ostream &str, const r_Attribute &type);
126 
127 #endif
r_Float
float r_Float
Definition: odmgtypes.hh:39
r_Attribute::get_char
r_Char get_char(const char *cell) const
mddtypes.hh
r_Attribute::get_ushort
r_UShort get_ushort(const char *cell) const
r_Short
std::int16_t r_Short
Definition: odmgtypes.hh:36
r_ULong
std::uint32_t r_ULong
Definition: odmgtypes.hh:38
r_Octet
std::int8_t r_Octet
Definition: odmgtypes.hh:34
r_Attribute::operator=
const r_Attribute & operator=(const r_Attribute &oldObj)
assignment operator.
r_Attribute::global_offset
r_Bytes global_offset() const
retrieve global offset
r_Bytes
size_t r_Bytes
number of bytes in an tile or mdd or type.
Definition: mddtypes.hh:43
r_Base_Type
This class is the superclass of the types r_Structure_Type and r_Primitive_Type in the representation...
Definition: basetype.hh:39
r_Char
std::uint8_t r_Char
Definition: odmgtypes.hh:33
r_Attribute::set_global_offset
void set_global_offset(r_Bytes newOffset)
set global offset
r_Long
std::int32_t r_Long
Definition: odmgtypes.hh:37
r_Attribute::get_ulong
r_ULong get_ulong(const char *cell) const
r_Attribute::print_status
virtual void print_status(std::ostream &s) const override
writes state of object to specified stream
r_Attribute::~r_Attribute
~r_Attribute() override
destructor.
r_Boolean
std::uint8_t r_Boolean
Definition: odmgtypes.hh:32
r_Attribute::get_float
r_Float get_float(const char *cell) const
r_Attribute::get_short
r_Short get_short(const char *cell) const
r_UShort
std::uint16_t r_UShort
Definition: odmgtypes.hh:35
r_Attribute::operator[]
r_Attribute operator[](unsigned int number) const
subscript operator to access attributes of a structured attribute throws error when type is not a str...
r_Attribute::r_Attribute
r_Attribute()
default constructor.
odmgtypes.hh
r_Attribute::get_long
r_Long get_long(const char *cell) const
r_Attribute::localOffset
r_Bytes localOffset
local offset
Definition: attribute.hh:118
property.hh
r_Attribute::globalOffset
r_Bytes globalOffset
global offset
Definition: attribute.hh:121
r_Double
double r_Double
Definition: odmgtypes.hh:40
r_Attribute::get_boolean
r_Boolean get_boolean(const char *cell) const
r_Attribute::get_double
r_Double get_double(const char *cell) const
r_Attribute::offset
r_Bytes offset() const
retrieve (local) offset
r_Attribute
This class represents attributes of structs in the ODMG conformant representation of the RasDaMan typ...
Definition: attribute.hh:46
operator<<
std::ostream & operator<<(std::ostream &str, const r_Attribute &type)
r_Attribute::set_offset
void set_offset(r_Bytes newOffset)
set (local) offset
r_Attribute::get_octet
r_Octet get_octet(const char *cell) const
r_Property
This class the superclass for properties of classes in the ODMG conformant representation of the RasD...
Definition: property.hh:40