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 /
18rasdaman 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
31class r_Base_Type;
32
40//@ManMemo: Module: {\bf raslib}
41
46class r_Attribute : public r_Property
47{
48public:
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
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
87 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
116protected:
119
122};
123
124//@Doc: write the status of a attribute to a stream
125extern std::ostream &operator<<(std::ostream &str, const r_Attribute &type);
126
127#endif
std::ostream & operator<<(std::ostream &str, const r_Attribute &type)
This class represents attributes of structs in the ODMG conformant representation of the RasDaMan typ...
Definition attribute.hh:47
r_Bytes globalOffset
global offset
Definition attribute.hh:121
r_Long get_long(const char *cell) const
~r_Attribute() override
destructor.
r_Attribute(const char *newTypeName, const r_Base_Type &newType)
constructor getting name and type of attribute.
r_Bytes global_offset() const
retrieve global offset
r_Short get_short(const char *cell) const
r_Attribute(const r_Attribute &oldObj)
copy constructor.
r_Attribute()
default constructor.
void set_offset(r_Bytes newOffset)
set (local) offset
void set_global_offset(r_Bytes newOffset)
set global offset
r_Double get_double(const char *cell) const
r_Bytes offset() const
retrieve (local) offset
r_UShort get_ushort(const char *cell) const
virtual void print_status(std::ostream &s) const override
writes state of object to specified stream
r_ULong get_ulong(const char *cell) const
r_Char get_char(const char *cell) const
r_Octet get_octet(const char *cell) const
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_Bytes localOffset
local offset
Definition attribute.hh:118
r_Boolean get_boolean(const char *cell) const
const r_Attribute & operator=(const r_Attribute &oldObj)
assignment operator.
r_Float get_float(const char *cell) const
This class is the superclass of the types r_Structure_Type and r_Primitive_Type in the representation...
Definition basetype.hh:40
This class the superclass for properties of classes in the ODMG conformant representation of the RasD...
Definition property.hh:41
size_t r_Bytes
number of bytes in an tile or mdd or type.
Definition mddtypes.hh:43
std::uint32_t r_ULong
Definition odmgtypes.hh:38
double r_Double
Definition odmgtypes.hh:40
std::uint16_t r_UShort
Definition odmgtypes.hh:35
float r_Float
Definition odmgtypes.hh:39
std::int8_t r_Octet
Definition odmgtypes.hh:34
std::uint8_t r_Char
Definition odmgtypes.hh:33
std::int32_t r_Long
Definition odmgtypes.hh:37
std::uint8_t r_Boolean
Definition odmgtypes.hh:32
std::int16_t r_Short
Definition odmgtypes.hh:36