summaryrefslogtreecommitdiffstats
path: root/rasodmg
diff options
context:
space:
mode:
authorAndrei Aiordachioaie <a.aiordachioaie@jacobs-university.de>2009-08-25 13:33:09 +0200
committerPeter Baumann <baumann@rasdaman.org>2009-08-27 09:38:08 +0200
commitfd66ca862d4499378719e2a635c9f97df28b763d (patch)
treee11e40b69e30b4d553cd0bcdedb435849c22e0d0 /rasodmg
parentbb3139b97d956a8455649af82c0f3b705d2a8e55 (diff)
downloadrasdaman-upstream-fd66ca862d4499378719e2a635c9f97df28b763d.zip
rasdaman-upstream-fd66ca862d4499378719e2a635c9f97df28b763d.tar.gz
rasdaman-upstream-fd66ca862d4499378719e2a635c9f97df28b763d.tar.xz
Tiling & Indexing options added to rasql grammar
Diffstat (limited to 'rasodmg')
-rw-r--r--rasodmg/Makefile.am2
-rw-r--r--rasodmg/alignedtiling.cc2
-rw-r--r--rasodmg/dirdecompose.cc11
-rw-r--r--rasodmg/dirdecompose.hh5
-rw-r--r--rasodmg/dirtiling.cc12
-rw-r--r--rasodmg/interesttiling.cc6
-rw-r--r--rasodmg/stattiling.cc10
-rw-r--r--rasodmg/tiling.cc4
-rw-r--r--rasodmg/tiling.hh4
9 files changed, 35 insertions, 21 deletions
diff --git a/rasodmg/Makefile.am b/rasodmg/Makefile.am
index d781176..d6c8348 100644
--- a/rasodmg/Makefile.am
+++ b/rasodmg/Makefile.am
@@ -44,10 +44,10 @@ librasodmg_a_SOURCES = collection.cc collection.hh collection.icc \
database.cc database.hh database.icc \
gmarray.cc gmarray.hh gmarray.icc \
storagelayout.cc storagelayout.hh storagelayout.icc \
+ dirdecompose.cc dirdecompose.hh \
tiling.cc tiling.hh \
alignedtiling.cc alignedtiling.hh alignedtiling.icc \
dirtiling.cc dirtiling.hh \
- dirdecompose.cc dirdecompose.hh \
interesttiling.cc interesttiling.hh \
stattiling.cc stattiling.hh \
partinsert.cc partinsert.hh \
diff --git a/rasodmg/alignedtiling.cc b/rasodmg/alignedtiling.cc
index 13313f4..1ddb21d 100644
--- a/rasodmg/alignedtiling.cc
+++ b/rasodmg/alignedtiling.cc
@@ -66,7 +66,7 @@ r_Aligned_Tiling::r_Aligned_Tiling(const char* encoded) throw (r_Error)
char *pToConvert=NULL;
pStart=encoded;
pEnd=pStart+strlen(pStart);
- pRes=strstr(pStart, COLON);
+ pRes=strstr(pStart, TCOLON);
if(!pRes)
{
RMInit::logOut << "r_Aligned_Tiling::r_Aligned_Tiling(" << encoded << "): Error decoding tile configuration from tilingparams." << std::endl;
diff --git a/rasodmg/dirdecompose.cc b/rasodmg/dirdecompose.cc
index d00b9b4..a230b52 100644
--- a/rasodmg/dirdecompose.cc
+++ b/rasodmg/dirdecompose.cc
@@ -139,6 +139,17 @@ std::ostream& operator<<(std::ostream& os, const r_Dir_Decompose& d)
return os;
}
+std::ostream& operator<<(std::ostream& os, const std::vector<r_Dir_Decompose>& vec)
+{
+ os << " Vector { ";
+
+ int size = vec.size();
+ for (int i = 0; i < size; i++)
+ os << vec[i] << std::endl;
+
+ os << " } ";
+}
+
r_Sinterval
r_Dir_Decompose::get_total_interval( )
{
diff --git a/rasodmg/dirdecompose.hh b/rasodmg/dirdecompose.hh
index c183fd0..96d4bb0 100644
--- a/rasodmg/dirdecompose.hh
+++ b/rasodmg/dirdecompose.hh
@@ -36,7 +36,9 @@ rasdaman GmbH.
// Include statements
#include <iostream>
+#include <vector>
using std::cout;
+using std::vector;
#include "raslib/error.hh"
#include "raslib/sinterval.hh"
@@ -70,7 +72,7 @@ class r_Dir_Decompose
r_Dir_Decompose();
virtual ~r_Dir_Decompose();
-
+
/// Copy constructor
r_Dir_Decompose(const r_Dir_Decompose& other);
@@ -110,5 +112,6 @@ protected:
Prints the status of an r_Dir_Decompose object to a stream
*/
extern std::ostream& operator<<(std::ostream& os, const r_Dir_Decompose& d);
+extern std::ostream& operator<<(std::ostream& os, const std::vector<r_Dir_Decompose>& vec);
#endif
diff --git a/rasodmg/dirtiling.cc b/rasodmg/dirtiling.cc
index f0bf682..fda8ddc 100644
--- a/rasodmg/dirtiling.cc
+++ b/rasodmg/dirtiling.cc
@@ -134,7 +134,7 @@ r_Dir_Tiling::r_Dir_Tiling(const char* encoded) throw (r_Error)
pEnd=pTemp+strlen(pStart);
//deal with dimension
- pRes=strstr(pTemp, COLON);
+ pRes=strstr(pTemp, TCOLON);
if(!pRes)
{
RMInit::logOut << "r_Dir_Tiling::r_Dir_Tiling(" << encoded << "): Error decoding tile dimension." << endl;
@@ -173,7 +173,7 @@ r_Dir_Tiling::r_Dir_Tiling(const char* encoded) throw (r_Error)
pTemp=pRes;
//deal with directional decompose
- pRes=strstr(pTemp, COLON);
+ pRes=strstr(pTemp, TCOLON);
if(!pRes)
{
RMInit::logOut << "r_Dir_Tiling::r_Dir_Tiling(" << encoded << "): Error decoding directional decompose." << endl;
@@ -223,7 +223,7 @@ r_Dir_Tiling::r_Dir_Tiling(const char* encoded) throw (r_Error)
if(*pDirToConvert != *ASTERIX)
{
- pDirRes=strstr(pDirToConvert, COMMA);
+ pDirRes=strstr(pDirToConvert, TCOMMA);
if(!pDirRes)
{
RMInit::logOut << "r_Dir_Tiling::r_Dir_Tiling(" << encoded << "): Error decoding directional decompose for dimension " << dirIndex+1 << " from \"" << pToConvert << "\"." << endl;
@@ -265,7 +265,7 @@ r_Dir_Tiling::r_Dir_Tiling(const char* encoded) throw (r_Error)
pDirTemp=pDirRes;
//next decomp
- pDirRes=strstr(pDirTemp, COMMA);
+ pDirRes=strstr(pDirTemp, TCOMMA);
if(!pDirRes)
{
decomp=strtoul(pDirTemp, (char**)&pDirRes, DefaultBase);
@@ -295,7 +295,7 @@ r_Dir_Tiling::r_Dir_Tiling(const char* encoded) throw (r_Error)
else
pDirStart++;
- pDirRes=strstr(pDirStart, COMMA);
+ pDirRes=strstr(pDirStart, TCOMMA);
if(!pDirRes)
{
RMInit::logOut << "r_Dir_Tiling::r_Dir_Tiling(" << encoded << "): Error decoding directional decompose for dimension " << dirIndex+1 << " from \"" << pToConvert << "\", end of stream." << endl;
@@ -328,7 +328,7 @@ r_Dir_Tiling::r_Dir_Tiling(const char* encoded) throw (r_Error)
pTemp=pRes;
//deal with tilesize
- pRes=strstr(pTemp, COLON);
+ pRes=strstr(pTemp, TCOLON);
if(!pRes)
{
RMInit::logOut << "r_Dir_Tiling::r_Dir_Tiling(" << encoded << "): Error decoding tile size from \"" << pTemp << "\", end of stream." << endl;
diff --git a/rasodmg/interesttiling.cc b/rasodmg/interesttiling.cc
index aad8841..3e25818 100644
--- a/rasodmg/interesttiling.cc
+++ b/rasodmg/interesttiling.cc
@@ -149,7 +149,7 @@ r_Interest_Tiling::r_Interest_Tiling(const char* encoded) throw (r_Error)
pStart=encoded;
pEnd=pStart+strlen(pStart);
pTemp=pStart;
- pRes=strstr(pTemp,COLON);
+ pRes=strstr(pTemp,TCOLON);
if(!pRes)
{
@@ -189,7 +189,7 @@ r_Interest_Tiling::r_Interest_Tiling(const char* encoded) throw (r_Error)
//parse interest areas
pTemp=pRes;
- pRes=strstr(pTemp,COLON);
+ pRes=strstr(pTemp,TCOLON);
if(!pRes)
{
@@ -235,7 +235,7 @@ r_Interest_Tiling::r_Interest_Tiling(const char* encoded) throw (r_Error)
//try next item
pTemp=pRes;
- pRes=strstr(pTemp, COLON);
+ pRes=strstr(pTemp, TCOLON);
}
if(vectInterestAreas.empty())
diff --git a/rasodmg/stattiling.cc b/rasodmg/stattiling.cc
index d99df04..f9163b6 100644
--- a/rasodmg/stattiling.cc
+++ b/rasodmg/stattiling.cc
@@ -91,7 +91,7 @@ r_Stat_Tiling::r_Stat_Tiling(const char* encoded) throw (r_Error)
pEnd=pStart+strlen(pStart);
pTemp=pStart;
- pRes=strstr(pTemp,COLON);
+ pRes=strstr(pTemp,TCOLON);
if(!pRes)
{
RMInit::logOut << "r_Stat_Tiling::r_Stat_Tiling(" << encoded << "): Error decoding tile dimension from \"" << pTemp << "\"." << endl;
@@ -130,7 +130,7 @@ r_Stat_Tiling::r_Stat_Tiling(const char* encoded) throw (r_Error)
//deal with access informations
pTemp=pRes;
- pRes=strstr(pTemp, COLON);
+ pRes=strstr(pTemp, TCOLON);
if(!pRes)
{
RMInit::logOut << "r_Stat_Tiling::r_Stat_Tiling(" << encoded << "): Error decoding access information from \"" << pTemp << "\"." << endl;
@@ -179,7 +179,7 @@ r_Stat_Tiling::r_Stat_Tiling(const char* encoded) throw (r_Error)
}
//deal with access Times
- pInRes=strstr(pInRes, COMMA);
+ pInRes=strstr(pInRes, TCOMMA);
if(!pInRes)
{
RMInit::logOut << "r_Stat_Tiling::r_Stat_Tiling(" << encoded << "): Error decoding access times \"" << pInRes << "\" from acess information \"" << pToConvert << "\", not specified." << endl;
@@ -230,7 +230,7 @@ r_Stat_Tiling::r_Stat_Tiling(const char* encoded) throw (r_Error)
//deal with next item
pTemp=pRes;
- pRes=strstr(pTemp, COLON);
+ pRes=strstr(pTemp, TCOLON);
}
if(vectAccessInfo.empty())
@@ -271,7 +271,7 @@ r_Stat_Tiling::r_Stat_Tiling(const char* encoded) throw (r_Error)
//deal with interestTH
pTemp=pRes;
- pRes=strstr(pTemp,COLON);
+ pRes=strstr(pTemp,TCOLON);
if(!pRes)
{
RMInit::logOut << "r_Stat_Tiling::r_Stat_Tiling(" << encoded << "): Error decoding interesting threshold." << endl;
diff --git a/rasodmg/tiling.cc b/rasodmg/tiling.cc
index 89801c3..3d3d01d 100644
--- a/rasodmg/tiling.cc
+++ b/rasodmg/tiling.cc
@@ -46,9 +46,9 @@ rasdaman GmbH.
const char*
r_Tiling::ASTERIX = "*";
const char*
-r_Tiling::COLON = ";";
+r_Tiling::TCOLON = ";";
const char*
-r_Tiling::COMMA = ",";
+r_Tiling::TCOMMA = ",";
const char*
r_Tiling::LSQRBRA = "[";
const char*
diff --git a/rasodmg/tiling.hh b/rasodmg/tiling.hh
index e178e0a..d78ecbe 100644
--- a/rasodmg/tiling.hh
+++ b/rasodmg/tiling.hh
@@ -98,8 +98,8 @@ class r_Tiling
*/
static const char* ASTERIX;
- static const char* COLON;
- static const char* COMMA;
+ static const char* TCOLON;
+ static const char* TCOMMA;
static const char* LSQRBRA;
static const char* RSQRBRA;
static const long DefaultBase;