summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorConstantin Jucovschi <cj@ubuntu.localdomain>2009-04-24 07:20:22 -0400
committerConstantin Jucovschi <cj@ubuntu.localdomain>2009-04-24 07:20:22 -0400
commit8f27e65bddd7d4b8515ce620fb485fdd78fcdf89 (patch)
treebd328a4dd4f92d32202241b5e3a7f36177792c5f /include
downloadrasdaman-upstream-8f27e65bddd7d4b8515ce620fb485fdd78fcdf89.zip
rasdaman-upstream-8f27e65bddd7d4b8515ce620fb485fdd78fcdf89.tar.gz
rasdaman-upstream-8f27e65bddd7d4b8515ce620fb485fdd78fcdf89.tar.xz
Initial commitv8.0
Diffstat (limited to 'include')
-rw-r--r--include/basictypes.hh207
-rw-r--r--include/basictypes.odl112
-rw-r--r--include/bool.h23
-rw-r--r--include/globals.hh77
-rw-r--r--include/rasdaman.hh70
-rw-r--r--include/stdexcept.h144
6 files changed, 633 insertions, 0 deletions
diff --git a/include/basictypes.hh b/include/basictypes.hh
new file mode 100644
index 0000000..8148208
--- /dev/null
+++ b/include/basictypes.hh
@@ -0,0 +1,207 @@
+/*
+* This file is part of rasdaman community.
+*
+* Rasdaman community is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* Rasdaman community is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with rasdaman community. If not, see <http://www.gnu.org/licenses/>.
+*
+* Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Peter Baumann /
+rasdaman GmbH.
+*
+* For more information please see <http://www.rasdaman.org>
+* or contact Peter Baumann via <baumann@rasdaman.com>.
+*/
+
+//------------------------------------------------------------
+// This file is created automatically by the rasdl processor.
+//
+// DO NOT EDIT
+//------------------------------------------------------------
+
+#ifndef __BASICTYPES_HH_
+#define __BASICTYPES_HH_
+
+//------------------------------------------------------------
+// Includes
+//------------------------------------------------------------
+
+#include "rasdaman.hh"
+
+/*[2,25]*//* TYPEDEF ------------------------- GreyImage */
+typedef r_Marray<r_Char> GreyImage;
+
+/*[3,24]*//* TYPEDEF ------------------------- GreySet */
+typedef r_Set<r_Ref<GreyImage> > GreySet;
+
+/*[6,28]*//* TYPEDEF ------------------------- BoolImage */
+typedef r_Marray<r_Boolean> BoolImage;
+
+/*[7,24]*//* TYPEDEF ------------------------- BoolSet */
+typedef r_Set<r_Ref<BoolImage> > BoolSet;
+
+/*[10,1]*//* STRUCT -------------------------- RGBPixel */
+struct RGBPixel {
+ r_Char red;
+ r_Char green;
+ r_Char blue;
+};
+/*[11,29]*//* TYPEDEF ------------------------- RGBImage */
+typedef r_Marray<RGBPixel> RGBImage;
+
+/*[12,23]*//* TYPEDEF ------------------------- RGBSet */
+typedef r_Set<r_Ref<RGBImage> > RGBSet;
+
+/*[15,35]*//* TYPEDEF ------------------------- ULongImage */
+typedef r_Marray<r_ULong > ULongImage;
+
+/*[16,25]*//* TYPEDEF ------------------------- ULongSet */
+typedef r_Set<r_Ref<ULongImage> > ULongSet;
+
+/*[19,26]*//* TYPEDEF ------------------------- GreyCube */
+typedef r_Marray<r_Char> GreyCube;
+
+/*[20,23]*//* TYPEDEF ------------------------- GreySet3 */
+typedef r_Set<r_Ref<GreyCube> > GreySet3;
+
+/*[24,29]*//* TYPEDEF ------------------------- BoolString */
+typedef r_Marray<r_Boolean> BoolString;
+
+/*[25,25]*//* TYPEDEF ------------------------- BoolSet1 */
+typedef r_Set<r_Ref<BoolString> > BoolSet1;
+
+/*[27,29]*//* TYPEDEF ------------------------- BoolCube */
+typedef r_Marray<r_Boolean> BoolCube;
+
+/*[28,23]*//* TYPEDEF ------------------------- BoolSet3 */
+typedef r_Set<r_Ref<BoolCube> > BoolSet3;
+
+/*[30,26]*//* TYPEDEF ------------------------- GreyString */
+typedef r_Marray<r_Char> GreyString;
+
+/*[31,25]*//* TYPEDEF ------------------------- GreySet1 */
+typedef r_Set<r_Ref<GreyString> > GreySet1;
+
+/*[33,27]*//* TYPEDEF ------------------------- ShortString */
+typedef r_Marray<r_Short > ShortString;
+
+/*[34,26]*//* TYPEDEF ------------------------- ShortSet1 */
+typedef r_Set<r_Ref<ShortString> > ShortSet1;
+
+/*[36,27]*//* TYPEDEF ------------------------- ShortImage */
+typedef r_Marray<r_Short > ShortImage;
+
+/*[37,25]*//* TYPEDEF ------------------------- ShortSet */
+typedef r_Set<r_Ref<ShortImage> > ShortSet;
+
+/*[39,27]*//* TYPEDEF ------------------------- ShortCube */
+typedef r_Marray<r_Short > ShortCube;
+
+/*[40,24]*//* TYPEDEF ------------------------- ShortSet3 */
+typedef r_Set<r_Ref<ShortCube> > ShortSet3;
+
+/*[42,36]*//* TYPEDEF ------------------------- UShortString */
+typedef r_Marray<r_UShort > UShortString;
+
+/*[43,27]*//* TYPEDEF ------------------------- UShortSet1 */
+typedef r_Set<r_Ref<UShortString> > UShortSet1;
+
+/*[45,36]*//* TYPEDEF ------------------------- UShortImage */
+typedef r_Marray<r_UShort > UShortImage;
+
+/*[46,26]*//* TYPEDEF ------------------------- UShortSet */
+typedef r_Set<r_Ref<UShortImage> > UShortSet;
+
+/*[48,36]*//* TYPEDEF ------------------------- UShortCube */
+typedef r_Marray<r_UShort > UShortCube;
+
+/*[49,25]*//* TYPEDEF ------------------------- UShortSet3 */
+typedef r_Set<r_Ref<UShortCube> > UShortSet3;
+
+/*[51,26]*//* TYPEDEF ------------------------- LongString */
+typedef r_Marray<r_Long > LongString;
+
+/*[52,25]*//* TYPEDEF ------------------------- LongSet1 */
+typedef r_Set<r_Ref<LongString> > LongSet1;
+
+/*[54,26]*//* TYPEDEF ------------------------- LongImage */
+typedef r_Marray<r_Long > LongImage;
+
+/*[55,24]*//* TYPEDEF ------------------------- LongSet */
+typedef r_Set<r_Ref<LongImage> > LongSet;
+
+/*[57,26]*//* TYPEDEF ------------------------- LongCube */
+typedef r_Marray<r_Long > LongCube;
+
+/*[58,23]*//* TYPEDEF ------------------------- LongSet3 */
+typedef r_Set<r_Ref<LongCube> > LongSet3;
+
+/*[60,35]*//* TYPEDEF ------------------------- ULongString */
+typedef r_Marray<r_ULong > ULongString;
+
+/*[61,26]*//* TYPEDEF ------------------------- ULongSet1 */
+typedef r_Set<r_Ref<ULongString> > ULongSet1;
+
+/*[63,35]*//* TYPEDEF ------------------------- ULongCube */
+typedef r_Marray<r_ULong > ULongCube;
+
+/*[64,24]*//* TYPEDEF ------------------------- ULongSet3 */
+typedef r_Set<r_Ref<ULongCube> > ULongSet3;
+
+/*[66,30]*//* TYPEDEF ------------------------- RGBString */
+typedef r_Marray<RGBPixel> RGBString;
+
+/*[67,24]*//* TYPEDEF ------------------------- RGBSet1 */
+typedef r_Set<r_Ref<RGBString> > RGBSet1;
+
+/*[69,30]*//* TYPEDEF ------------------------- RGBCube */
+typedef r_Marray<RGBPixel> RGBCube;
+
+/*[70,22]*//* TYPEDEF ------------------------- RGBSet3 */
+typedef r_Set<r_Ref<RGBCube> > RGBSet3;
+
+/*[72,27]*//* TYPEDEF ------------------------- FloatString */
+typedef r_Marray<r_Float> FloatString;
+
+/*[73,26]*//* TYPEDEF ------------------------- FloatSet1 */
+typedef r_Set<r_Ref<FloatString> > FloatSet1;
+
+/*[75,27]*//* TYPEDEF ------------------------- FloatImage */
+typedef r_Marray<r_Float> FloatImage;
+
+/*[76,25]*//* TYPEDEF ------------------------- FloatSet */
+typedef r_Set<r_Ref<FloatImage> > FloatSet;
+
+/*[78,27]*//* TYPEDEF ------------------------- FloatCube */
+typedef r_Marray<r_Float> FloatCube;
+
+/*[79,24]*//* TYPEDEF ------------------------- FloatSet3 */
+typedef r_Set<r_Ref<FloatCube> > FloatSet3;
+
+/*[81,28]*//* TYPEDEF ------------------------- DoubleString */
+typedef r_Marray<r_Double> DoubleString;
+
+/*[82,27]*//* TYPEDEF ------------------------- DoubleSet1 */
+typedef r_Set<r_Ref<DoubleString> > DoubleSet1;
+
+/*[84,28]*//* TYPEDEF ------------------------- DoubleImage */
+typedef r_Marray<r_Double> DoubleImage;
+
+/*[85,26]*//* TYPEDEF ------------------------- DoubleSet */
+typedef r_Set<r_Ref<DoubleImage> > DoubleSet;
+
+/*[87,28]*//* TYPEDEF ------------------------- DoubleCube */
+typedef r_Marray<r_Double> DoubleCube;
+
+/*[88,25]*//* TYPEDEF ------------------------- DoubleSet3 */
+typedef r_Set<r_Ref<DoubleCube> > DoubleSet3;
+
+#endif
diff --git a/include/basictypes.odl b/include/basictypes.odl
new file mode 100644
index 0000000..ec1884c
--- /dev/null
+++ b/include/basictypes.odl
@@ -0,0 +1,112 @@
+// example 1
+typedef marray <char,2> GreyImage;
+typedef set<GreyImage> GreySet;
+
+// example 2
+typedef marray <boolean,2> BoolImage;
+typedef set<BoolImage> BoolSet;
+
+// example 3
+struct RGBPixel { char red, green, blue; };
+typedef marray <RGBPixel,2> RGBImage;
+typedef set<RGBImage> RGBSet;
+
+// example 4
+typedef marray <unsigned long, 2> ULongImage;
+typedef set<ULongImage> ULongSet;
+
+// example 5
+typedef marray <char, 3> GreyCube;
+typedef set<GreyCube> GreySet3;
+
+
+// heavily expanded types (Andreas)
+typedef marray <boolean, 1> BoolString;
+typedef set<BoolString> BoolSet1;
+
+typedef marray <boolean, 3> BoolCube;
+typedef set<BoolCube> BoolSet3;
+
+typedef marray <char, 1> GreyString;
+typedef set<GreyString> GreySet1;
+
+typedef marray <octet, 1> OctetString;
+typedef set<OctetString> OctetSet1;
+
+typedef marray <octet, 2> OctetImage;
+typedef set<OctetImage> OctetSet;
+
+typedef marray <octet, 3> OctetCube;
+typedef set<OctetCube> OctetSet3;
+
+typedef marray <short, 1> ShortString;
+typedef set<ShortString> ShortSet1;
+
+typedef marray <short, 2> ShortImage;
+typedef set<ShortImage> ShortSet;
+
+typedef marray <short, 3> ShortCube;
+typedef set<ShortCube> ShortSet3;
+
+typedef marray <unsigned short, 1> UShortString;
+typedef set<UShortString> UShortSet1;
+
+typedef marray <unsigned short, 2> UShortImage;
+typedef set<UShortImage> UShortSet;
+
+typedef marray <unsigned short, 3> UShortCube;
+typedef set<UShortCube> UShortSet3;
+
+typedef marray <long, 1> LongString;
+typedef set<LongString> LongSet1;
+
+typedef marray <long, 2> LongImage;
+typedef set<LongImage> LongSet;
+
+typedef marray <long, 3> LongCube;
+typedef set<LongCube> LongSet3;
+
+typedef marray <unsigned long, 1> ULongString;
+typedef set<ULongString> ULongSet1;
+
+typedef marray <unsigned long, 3> ULongCube;
+typedef set<ULongCube> ULongSet3;
+
+typedef marray <RGBPixel, 1> RGBString;
+typedef set<RGBString> RGBSet1;
+
+typedef marray <RGBPixel, 3> RGBCube;
+typedef set<RGBCube> RGBSet3;
+
+typedef marray <float, 1> FloatString;
+typedef set<FloatString> FloatSet1;
+
+typedef marray <float, 2> FloatImage;
+typedef set<FloatImage> FloatSet;
+
+typedef marray <float, 3> FloatCube;
+typedef set<FloatCube> FloatSet3;
+
+typedef marray <float, 4> FloatCube4;
+typedef set<FloatCube4> FloatSet4;
+
+typedef marray <double, 1> DoubleString;
+typedef set<DoubleString> DoubleSet1;
+
+typedef marray <double, 2> DoubleImage;
+typedef set<DoubleImage> DoubleSet;
+
+typedef marray <double, 3> DoubleCube;
+typedef set<DoubleCube> DoubleSet3;
+
+typedef marray <complex, 1> Gauss1;
+typedef set<Gauss1> GaussSet1;
+
+typedef marray<complexd, 1> Gauss2;
+typedef set<Gauss2> GaussSet2;
+
+typedef marray <complex, 2> Gauss1Image;
+typedef set<Gauss1Image> Gauss1Set;
+
+typedef marray<complexd, 2> Gauss2Image;
+typedef set<Gauss2Image> Gauss2Set;
diff --git a/include/bool.h b/include/bool.h
new file mode 100644
index 0000000..c8cf406
--- /dev/null
+++ b/include/bool.h
@@ -0,0 +1,23 @@
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation. Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose. It is provided "as is" without express or implied warranty.
+ *
+ */
+
+// most systems should have bool defined now (Sun CC 5.0, g++), it is in the
+// ANSI standard.
+
+#ifdef OS_HPUX_10
+#define bool int
+#endif
+#define true 1
+#define false 0
diff --git a/include/globals.hh b/include/globals.hh
new file mode 100644
index 0000000..e64392b
--- /dev/null
+++ b/include/globals.hh
@@ -0,0 +1,77 @@
+/*
+* This file is part of rasdaman community.
+*
+* Rasdaman community is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* Rasdaman community is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with rasdaman community. If not, see <http://www.gnu.org/licenses/>.
+*
+* Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Peter Baumann /
+rasdaman GmbH.
+*
+* For more information please see <http://www.rasdaman.org>
+* or contact Peter Baumann via <baumann@rasdaman.com>.
+/
+/**
+ * SOURCE: globals.hh
+ *
+ * MODULE: rasdaman
+ * CLASS: Globals
+ *
+ * PURPOSE:
+ * This class provides basic constants used across rasdaman.
+ * Any value that is of external importance (default names, timeouts, ...)
+ * but are NOT TO BE DELIVERED should be defined here.
+ *
+ * COMMENTS:
+ * - make this a real class
+ * - successively collect all important values here
+ *
+*/
+
+#ifndef GLOBALS_HH
+#define GLOBALS_HH
+
+/// default rasmgr listen port
+#define DEFAULT_PORT 7001
+
+/// name of env var pointing to rasdaman home dir (ex: "/opt/rasdaman")
+#define RMANHOME_VAR "RMANHOME"
+
+/// default name of server machine, if gethostname() fails
+#define DEFAULT_HOSTNAME "localhost"
+
+/// default database name
+#define DEFAULT_DBNAME "RASBASE"
+
+/// name of rasmgr configuration file
+#define RASMGR_CONF_FILE "rasmgr.conf"
+
+/// default r/o login name for client tools
+#define DEFAULT_USER "rasguest"
+/// default password for this user
+#define DEFAULT_PASSWD "rasguest"
+
+/// server log directory
+#define LOGDIR "/log"
+/// server alternative log directory, if RMANHOME not specified, defined via autoconf/automake
+#define ALT_LOGDIR ABSOLUTE_LOG_DIR
+/// log file suffix
+#define LOG_SUFFIX "log"
+
+/// max transfer buffer size (import clients)
+#define MAX_BUFFER_SIZE 4194304L
+
+/// client timeout [secs]
+#define CLIENT_TIMEOUT 300
+
+#endif // GLOBALS_HH
+
diff --git a/include/rasdaman.hh b/include/rasdaman.hh
new file mode 100644
index 0000000..8c983c9
--- /dev/null
+++ b/include/rasdaman.hh
@@ -0,0 +1,70 @@
+/*
+* This file is part of rasdaman community.
+*
+* Rasdaman community is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* Rasdaman community is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with rasdaman community. If not, see <http://www.gnu.org/licenses/>.
+*
+* Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Peter Baumann /
+rasdaman GmbH.
+*
+* For more information please see <http://www.rasdaman.org>
+* or contact Peter Baumann via <baumann@rasdaman.com>.
+*/
+
+//------------------------------------------------------------
+// RasDaMan Standard Include
+//
+// DO NOT EDIT
+//------------------------------------------------------------
+
+#ifndef __RASDAMAN_HH_
+#define __RASDAMAN_HH_
+
+//------------------------------------------------------------
+// Includes
+//------------------------------------------------------------
+
+#include "rasodmg/ref.hh"
+#include "rasodmg/transaction.hh"
+#include "rasodmg/database.hh"
+#include "rasodmg/set.hh"
+#include "rasodmg/iterator.hh"
+#include "rasodmg/marray.hh"
+#include "rasodmg/oqlquery.hh"
+#include "rasodmg/storagelayout.hh"
+#include "rasodmg/alignedtiling.hh"
+#include "rasodmg/interesttiling.hh"
+#include "rasodmg/dirtiling.hh"
+#include "rasodmg/stattiling.hh"
+
+#include "raslib/endian.hh"
+#include "raslib/odmgtypes.hh"
+#include "raslib/mddtypes.hh"
+#include "raslib/oid.hh"
+#include "raslib/type.hh"
+#include "raslib/minterval.hh"
+#include "raslib/primitive.hh"
+#include "raslib/complex.hh"
+#include "raslib/structure.hh"
+#include "raslib/primitivetype.hh"
+#include "raslib/complextype.hh"
+#include "raslib/structuretype.hh"
+#include "raslib/rmdebug.hh"
+#include "raslib/parseparams.hh"
+
+#include "conversion/convertor.hh"
+#include "conversion/convfactory.hh"
+
+#include "compression/tilecompression.hh"
+
+#endif
diff --git a/include/stdexcept.h b/include/stdexcept.h
new file mode 100644
index 0000000..0c0a3af
--- /dev/null
+++ b/include/stdexcept.h
@@ -0,0 +1,144 @@
+/*
+* This file is part of rasdaman community.
+*
+* Rasdaman community is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* Rasdaman community is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with rasdaman community. If not, see <http://www.gnu.org/licenses/>.
+*
+* Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Peter Baumann /
+rasdaman GmbH.
+*
+* For more information please see <http://www.rasdaman.org>
+* or contact Peter Baumann via <baumann@rasdaman.com>.
+/
+/**
+ * INCLUDE: stdexcept.h
+ *
+ * CLASSES: exception
+ * logic_error
+ * domain_error
+ * invalid_argument
+ * length_error
+ * out_of_range
+ * runtime_error
+ * range_error
+ * overflow_error
+ *
+ * PURPOSE:
+ * This file implements the exception class hierarchy of
+ * Standard C++. It is thought to be substituted by a
+ * compiler package implementation in future.
+ *
+ * COMMENTS:
+ *
+*/
+
+#ifndef _D_EXCEPTION_
+#define _D_EXCEPTION_
+
+class exception
+{
+ public:
+ exception() throw() : errorString(0) {};
+
+ exception( const char* s ) throw()
+ {
+ errorString = new char[strlen(s)+1];
+ strcpy( errorString, s );
+ };
+
+ exception( const exception& ex ) throw()
+ {
+ errorString = new char[strlen(ex.what())+1];
+ strcpy( errorString, ex.what() );
+ };
+
+ ~exception() throw()
+ {
+ if( errorString ) delete[] errorString;
+ };
+
+ exception& operator=( const exception& ex ) throw()
+ {
+ if( this != &ex )
+ {
+ if( errorString ) delete[] errorString;
+
+ errorString = new char[strlen(ex.what())+1];
+ strcpy( errorString, ex.what() );
+ }
+ return *this;
+ };
+
+ inline virtual const char* what() const throw() { return errorString; };
+
+ private:
+ char* errorString;
+};
+
+
+class logic_error : public exception
+{
+ public:
+ logic_error( const char* what_arg ) throw() : exception( what_arg ) {};
+};
+
+
+class domain_error : public logic_error
+{
+ public:
+ domain_error( const char* what_arg ) throw() : logic_error( what_arg ) {};
+};
+
+
+class invalid_argument : public logic_error
+{
+ public:
+ invalid_argument( const char* what_arg ) throw() : logic_error( what_arg ) {};
+};
+
+
+class length_error : public logic_error
+{
+ public:
+ length_error( const char* what_arg ) throw() : logic_error( what_arg ) {};
+};
+
+
+class out_of_range : public logic_error
+{
+ public:
+ out_of_range( const char* what_arg ) throw() : logic_error( what_arg ) {};
+};
+
+
+class runtime_error : public exception
+{
+ public:
+ runtime_error( const char* what_arg ) throw() : exception( what_arg ) {};
+};
+
+
+class range_error : public runtime_error
+{
+ public:
+ range_error( const char* what_arg ) throw() : runtime_error( what_arg ) {};
+};
+
+
+class overflow_error : public runtime_error
+{
+ public:
+ overflow_error( const char* what_arg ) throw() : runtime_error( what_arg ) {};
+};
+
+#endif