rasdaman client API  10.6.3
The Array Analytics Engine: Datacubes at Your Fingertips
collectiontype.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_COLLECTION_TYPE_HH
25 #define D_COLLECTION_TYPE_HH
26 
27 #include "raslib/type.hh"
28 
29 //@ManMemo: Module: {\bf raslib}
38 class r_Collection_Type : public r_Type
39 {
40 public:
42  typedef enum
43  {
44  SET
45  } r_Kind;
46 
51 
53  explicit r_Collection_Type(r_Type &newType);
54 
56  ~r_Collection_Type() override;
57 
59  r_Kind kind() const;
60 
65 
69  const r_Type &element_type() const;
70 
72  r_Type *clone() const override;
73 
75  r_Type::r_Type_Id type_id() const override;
76 
77  bool isCollectionType() const override;
78 
80  void convertToLittleEndian(char *cells, r_Area noCells) const override;
81 
83  void convertToBigEndian(char *cells, r_Area noCells) const override;
84 
86  void print_status(std::ostream &s) const override;
87 
88 protected:
92 
95 };
96 
97 //@Doc: write the status of a collection type to a stream
98 extern std::ostream &operator<<(std::ostream &str, const r_Collection_Type &type);
99 
100 #endif
This class represents the collection type in the ODMG conformant representation of the RasDaMan type ...
Definition: collectiontype.hh:39
r_Type * clone() const override
clone operation
const r_Type & element_type() const
get element type the exception is only raised when the element type of the copied type is NULL.
r_Type * elementType
element type
Definition: collectiontype.hh:94
const r_Collection_Type & operator=(const r_Collection_Type &oldObj)
assignment operator the exception is only raised when the element type of the copied type is NULL.
r_Collection_Type(r_Type &newType)
constructor getting element type
bool isCollectionType() const override
check, if type is a Colelction type
r_Kind kind() const
returns identifier SET of enumeration r_Kind
r_Type::r_Type_Id type_id() const override
retrieve id of the type.
void convertToBigEndian(char *cells, r_Area noCells) const override
converts array of cells from Unix byte order to NT byte order.
void convertToLittleEndian(char *cells, r_Area noCells) const override
converts array of cells from NT byte order to Unix byte order.
r_Kind
Set type in the only one needed right now.
Definition: collectiontype.hh:43
@ SET
Definition: collectiontype.hh:44
r_Collection_Type()
default constructor no one should use that
~r_Collection_Type() override
destructor
r_Collection_Type(const r_Collection_Type &)
copy constructor the exception is only raised when the element type of the copied type is NULL.
void print_status(std::ostream &s) const override
writes state of object to specified stream
This class the superclass for all types in the ODMG conformant representation of the RasDaMan type sy...
Definition: type.hh:51
r_Type_Id
typedef for the enum specifying a primitive type, structure type, marray type, interval type,...
Definition: type.hh:56
std::ostream & operator<<(std::ostream &str, const r_Collection_Type &type)
std::uint64_t r_Area
number of cells in an mdd object or tile.
Definition: mddtypes.hh:49