rasdaman client API  10.6.3
The Array Analytics Engine: Datacubes at Your Fingertips
flatbasetype.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 _FLAT_BASE_TYPE_HH_
25 #define _FLAT_BASE_TYPE_HH_
26 
27 #include "raslib/mddtypes.hh"
28 #include <iosfwd>
29 
30 class r_Base_Type;
31 class r_Primitive_Type;
32 class r_Structure_Type;
33 
34 //@ManMemo: Module {\bf raslib}
47 {
48 public:
50  r_Flat_Base_Type(void);
52  explicit r_Flat_Base_Type(const r_Base_Type *type);
56  ~r_Flat_Base_Type(void);
57 
59  unsigned int get_num_types(void) const;
62  const r_Primitive_Type *type(unsigned int num) const;
65  const r_Primitive_Type *operator[](unsigned int num) const;
68  unsigned int offset(unsigned int num) const;
70  r_Bytes size(void) const;
76  bool operator==(const r_Flat_Base_Type &src) const;
78  void print_status(std::ostream &str) const;
79 
80 protected:
82  void init_shared(void);
84  void process_type(const r_Base_Type *type);
88  void free_type_data(void);
89 
91  unsigned int parse_structure_type(const r_Structure_Type *type, unsigned int number,
92  unsigned int offset);
94  void parse_primitive_type(r_Primitive_Type *type, unsigned int number,
95  unsigned int offset);
96 
98  unsigned int numPrimTypes;
104  unsigned int *offsets;
105 };
106 
107 //@ManMemo: Module {\bf raslib}
108 
109 //@Doc: write the status of a flat base type to a stream
110 extern std::ostream &operator<<(std::ostream &str, const r_Flat_Base_Type &type);
111 
112 #endif
mddtypes.hh
r_Flat_Base_Type::offsets
unsigned int * offsets
the corresponding offsets
Definition: flatbasetype.hh:104
r_Flat_Base_Type::~r_Flat_Base_Type
~r_Flat_Base_Type(void)
destructor
r_Primitive_Type
This class represents all primitive types in the ODMG conformant representation of the RasDaMan type ...
Definition: primitivetype.hh:41
r_Flat_Base_Type::size
r_Bytes size(void) const
return size of entire type
r_Flat_Base_Type::free_type_data
void free_type_data(void)
free type-specific data (destructor, assignment)
r_Bytes
size_t r_Bytes
number of bytes in an tile or mdd or type.
Definition: mddtypes.hh:43
r_Flat_Base_Type::typeSize
r_Bytes typeSize
the total size of the entire type
Definition: flatbasetype.hh:100
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_Flat_Base_Type::operator[]
const r_Primitive_Type * operator[](unsigned int num) const
operator returns pointer to primitive type num or NULL if invalid index violation is thrown if higher...
r_Flat_Base_Type
This class can be used to get a more convenient view on a structured base type.
Definition: flatbasetype.hh:46
r_Flat_Base_Type::type
const r_Primitive_Type * type(unsigned int num) const
return pointer to primitive type num index violation is thrown if higher index is requested than avai...
r_Flat_Base_Type::copy_flat_type
void copy_flat_type(const r_Flat_Base_Type &type)
copy another flat type
r_Flat_Base_Type::numPrimTypes
unsigned int numPrimTypes
the number of primitive types
Definition: flatbasetype.hh:98
r_Flat_Base_Type::operator==
bool operator==(const r_Flat_Base_Type &src) const
equality
r_Flat_Base_Type::init_shared
void init_shared(void)
shared init code
r_Flat_Base_Type::get_num_types
unsigned int get_num_types(void) const
return number of primitive types
r_Flat_Base_Type::offset
unsigned int offset(unsigned int num) const
return offset of primitive type num index violation is thrown if higher index is requested than avail...
r_Flat_Base_Type::print_status
void print_status(std::ostream &str) const
print status to a stream
r_Flat_Base_Type::operator=
r_Flat_Base_Type & operator=(const r_Flat_Base_Type &src)
assignment of another flat type
operator<<
std::ostream & operator<<(std::ostream &str, const r_Flat_Base_Type &type)
r_Structure_Type
This class represents all user defined structured types in the ODMG conformant representation of the ...
Definition: structuretype.hh:40
r_Flat_Base_Type::process_type
void process_type(const r_Base_Type *type)
process a base type
r_Flat_Base_Type::primTypes
r_Primitive_Type ** primTypes
the primitive types
Definition: flatbasetype.hh:102
r_Flat_Base_Type::parse_structure_type
unsigned int parse_structure_type(const r_Structure_Type *type, unsigned int number, unsigned int offset)
parse a structure type and return number of primitive types contained therein
r_Flat_Base_Type::parse_primitive_type
void parse_primitive_type(r_Primitive_Type *type, unsigned int number, unsigned int offset)
parse a primitive type
r_Flat_Base_Type::r_Flat_Base_Type
r_Flat_Base_Type(void)
default constructor, shouldn't be used