rasdaman complete source
raslib/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 /
33 #ifndef _D_COLLECTION_TYPE_
34 #define _D_COLLECTION_TYPE_
35 
36 #include "raslib/type.hh"
37 class r_Error;
38 
39 
40 //@ManMemo: Module: {\bf raslib}
41 
42 /*@Doc:
43  This class represents the collection type in the ODMG conformant
44  representation of the RasDaMan type system.
45 */
46 
47 
48 class r_Collection_Type : public r_Type
49 {
50 public:
52  typedef enum { SET } r_Kind;
53 
58 
60  r_Collection_Type(r_Type& newType);
61 
63  r_Kind kind() const;
64 
68  const r_Collection_Type& operator=(const r_Collection_Type& oldObj) throw (r_Error);
69 
73  const r_Type& element_type() const throw (r_Error);
74 
76  virtual r_Type* clone() const;
77 
79  virtual r_Type::r_Type_Id type_id() const;
80 
81  virtual bool isCollectionType() const;
82 
84  virtual void convertToLittleEndian(char* cells, r_Area noCells) const;
85 
87  virtual void convertToBigEndian(char* cells, r_Area noCells) const;
88 
90  virtual void print_status(std::ostream& s = std::cout) const;
91 
94 
95 protected:
99 
102 };
103 
104 //@Doc: write the status of a collection type to a stream
105 extern std::ostream &operator<<( std::ostream &str, const r_Collection_Type &type );
106 
107 #endif
108 
r_Type * elementType
element type
Definition: raslib/collectiontype.hh:101
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_Kind kind() const
returns identifier SET of enumeration r_Kind
Definition: error.hh:88
Definition: raslib/type.hh:56
Definition: raslib/collectiontype.hh:48
virtual r_Type::r_Type_Id type_id() const
retrieve id of the type.
r_Kind
Set type in the only one needed right now.
Definition: raslib/collectiontype.hh:52
virtual void print_status(std::ostream &s=std::cout) const
writes state of object to specified stream
Definition: raslib/collectiontype.hh:52
uint64_t r_Area
Definition: mddtypes.hh:85
virtual bool isCollectionType() const
check, if type is a Colelction type
r_Type_Id
Definition: raslib/type.hh:61
virtual r_Type * clone() const
clone operation
virtual void convertToBigEndian(char *cells, r_Area noCells) const
converts array of cells from Unix byte order to NT byte order.
virtual void convertToLittleEndian(char *cells, r_Area noCells) const
converts array of cells from NT byte order to Unix byte order.
r_Collection_Type()
default constructor no one should use that