Aggregate.hh

Go to the documentation of this file.
00001 #ifndef AGGREGATE_HH
00002 #define AGGREGATE_HH
00003 
00004 //---------------------------------------------------------------------------
00005 // Copyright (c) 2004-2005 Clifton Labs, Inc.  All Rights Reserved.
00006 
00007 // You may modify, distribute, and use the software contained in this package
00008 // under the terms of the "GNU LIBRARY GENERAL PUBLIC LICENSE" version 2,
00009 // June 1991. A copy of this license agreement can be found in the file
00010 // "LGPL", distributed with this archive.
00011 //---------------------------------------------------------------------------
00012 
00013 #include "tyvis/CompositeLiteral.hh"
00014 
00015 class ArrayTypeInfo;
00016 class SubElementFactory;
00017 class TyvisVarArgs;
00018 class SerializedInstance;
00019     
00020 class Aggregate : public CompositeLiteral {
00021 public:
00024 
00031   Aggregate(); 
00032 
00040   Aggregate( const ArrayTypeInfo &typeInfo );
00041 
00043 
00046   Aggregate( const ArrayTypeInfo &typeInfo,
00047              TyvisVarArgs &initElements );
00048 
00049   Aggregate( TyvisVarArgs &initElements );
00050 
00054   Aggregate( const ArrayTypeInfo &typeInfo,
00055              const string &initValue );
00056 
00060   Aggregate( const ArrayTypeInfo &typeInfo,
00061              const RValue &initValue );
00062 
00064 
00071   Aggregate( const SubElementFactory &subElementFactory );
00072 
00074   Aggregate( const Aggregate &that );
00075 
00079   Aggregate( Aggregate &that,
00080              const ScalarTypeInfo &sliceSpecifier );
00081   
00083   virtual ~Aggregate();
00084 
00092   virtual void print(ostream& os) const;
00093 
00094 
00101   string toString() const;
00102 
00109   virtual RValue *clone() const;
00110 
00111   void serialize( SerializedInstance *addTo ) const;
00112   static const string &getAggregateDataType();
00113   const string &getDataType() const;
00114 
00115   Value getSlice( const ScalarTypeInfo &sliceSpecifier ) const;
00116 
00117 private:
00118 
00119   static TyvisVarArgs stringToVarArgs( const ArrayTypeInfo &typeInfo, const string &initValue );
00120 
00124   void printDimension( ostream &os, int dimension ) const;
00125 };
00126 
00127 #endif

Generated on Fri Mar 31 11:05:08 2006 for Tyvis by  doxygen 1.4.6