00001 #ifndef COMPOSITE_TYPE_INFO_HH 00002 #define COMPOSITE_TYPE_INFO_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 <vector> 00014 using std::vector; 00015 00016 #include "TypeInfo.hh" 00017 class ScalarTypeInfo; 00018 class SubElementFactory; 00019 class RValue; 00020 00021 class CompositeTypeInfo : public TypeInfo { 00022 public: 00023 virtual bool isConstrained() const; 00024 virtual bool isUnconstrained() const; 00025 00026 virtual const ScalarTypeInfo *getRange(int dimension) const; 00027 00028 virtual void constructFields( vector<RValue *> &elements, 00029 const SubElementFactory *subElementFactory, 00030 int numElements = -1 ) const = 0; 00031 00032 virtual int storageIndex( int elementIndex ) const { return elementIndex; } 00033 00034 virtual const TypeInfo &getElementTypeInfo( const RValue &index = defaultIndex() ) const = 0; 00035 virtual const ScalarTypeInfo &getIndexTypeInfo( const RValue &index = defaultIndex() ) const = 0; 00036 }; 00037 00038 #endif
1.4.6