rasdaman complete source
dirtiling.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 _R_DIRTILING_HH_
34 #define _R_DIRTILING_HH_
35 
36 // Include statements
37 class r_Dir_Decompose;
38 class r_Dir_Tiling;
39 
40 #include "rasodmg/tiling.hh"
41 
42 // Class definition
43 
44 //@ManMemo: Module: {\bf rasodmg}
45 
46 /*@Doc:
47  This class implements the "Directional Tiling" tiling method. In this
48  method the decomposition is done along certain directions of the
49  multi-dimensional cube. The user uses {\tt r_Dir_Decompose} to inform
50  the system on how the decomposition is done in each dimension.
51 */
52 
56 class r_Dir_Tiling : public r_Dimension_Tiling
57 {
58  // ******************* PUBLIC SECTION *******************
59 
60 public:
61 
63  enum SubTiling
64  {
65  WITHOUT_SUBTILING = 0,
66  WITH_SUBTILING = 1,
67  NUMBER = 2
68  };
71  r_Dir_Tiling(const char* encoded) throw (r_Error);
72 
74  r_Dir_Tiling(r_Dimension dims,
75  const std::vector<r_Dir_Decompose>& decomp,
76  r_Bytes ts = RMInit::clientTileSize,
77  SubTiling sub = WITH_SUBTILING) throw (r_Error);
89  virtual ~r_Dir_Tiling();
90 
91  virtual std::vector<r_Minterval>* compute_tiles(const r_Minterval& obj_domain, r_Bytes cell_size) const throw (r_Error);
92 
93  virtual bool is_compatible(const r_Minterval& obj_domain, r_Bytes type_len) const;
94 
95  virtual void print_status(std::ostream& os) const;
96 
97  virtual r_Tiling* clone() const;
98 
99  virtual r_Tiling_Scheme get_tiling_scheme() const;
100 
101  //@ManMemo: Module: {\bf raslib}
105  static r_Dir_Tiling::SubTiling get_subtiling_from_name(const char* name);
106  //@ManMemo: Module: {\bf raslib}
110  static const char* get_name_from_subtiling(SubTiling st);
111 
112  static const char* description;
113 
114 protected: // data
115 
117  std::vector<r_Dir_Decompose> dim_decomp;
118 
120  SubTiling sub_tile;
121 
122  //@ManMemo: Module: {\bf raslib}
130  static const char* subtiling_name_withoutsubtiling;
131  static const char* subtiling_name_withsubtiling;
132 
133  static const char* all_subtiling_names[r_Dir_Tiling::NUMBER];
134 };
135 
136 #endif
137 
static r_Bytes clientTileSize
Definition: rminit.hh:132