40 #ifndef _GLS_METADATA_ATTRIBUTES_H
41 #define _GLS_METADATA_ATTRIBUTES_H
79 *_attribPtr = ( val != 0 );
86 outstr << *_attribPtr;
93 T ConvertToIntOrBool(
int value )
98 inline bool ConvertToIntOrBool(
int value )
104 T ReadValueAsIntOrBool( std::istream& instr )
109 if( strcasecmp( value.c_str(),
"TRUE" ) == 0 )
113 else if( strcasecmp( value.c_str(),
"FALSE" ) == 0 )
120 temp = ConvertToIntOrBool<T>( atoi( value.c_str() ) );
128 *_attribPtr = ReadValueAsIntOrBool<bool>( instr );
139 *_attribPtr = (int)val;
149 *_attribPtr = (short)val;
159 *_attribPtr = (
unsigned short)val;
169 *_attribPtr = (
unsigned char)val;
177 outstr << (int)*_attribPtr;
186 *_attribPtr =
static_cast<unsigned char>( ReadValueAsIntOrBool<int>( instr ) );
195 *_attribPtr = ReadValueAsIntOrBool<int>( instr );
204 *_attribPtr = ReadValueAsIntOrBool<unsigned int>( instr );
216 *_attribPtr = (float)val;
232 virtual GLS_EXPORT
long ValueInt();
233 virtual GLS_EXPORT
void ValueInt(
long val );
235 virtual GLS_EXPORT std::ostream& WriteValue( std::ostream& outstr );
236 virtual GLS_EXPORT std::istream& ReadValue( std::istream& instr );
248 virtual GLS_EXPORT ~DistiAttributeFloatArray();
250 virtual GLS_EXPORT
bool OkToWrite()
const;
252 virtual GLS_EXPORT std::ostream& WriteValue( std::ostream& outstr );
253 virtual GLS_EXPORT std::istream& ReadValue( std::istream& instr );
265 virtual GLS_EXPORT ~DistiAttributeDoubleArray();
267 virtual GLS_EXPORT
bool OkToWrite()
const;
269 virtual GLS_EXPORT std::ostream& WriteValue( std::ostream& outstr );
270 virtual GLS_EXPORT std::istream& ReadValue( std::istream& instr );
282 template<
class containerClass>
287 using _BaseClass::_pairList;
289 typedef void ( containerClass::*SetMethodType )(
const int );
290 typedef int ( containerClass::*GetMethodType )();
295 _pairList = &TextureModeEnumList;
310 template<
class containerClass>
315 using _BaseClass::_pairList;
317 typedef void ( containerClass::*SetMethodType )(
const int );
318 typedef int ( containerClass::*GetMethodType )();
323 _pairList = &TextureFilterEnumList;
337 template<
class containerClass>
342 using _BaseClass::_pairList;
344 typedef void ( containerClass::*SetMethodType )(
const int );
345 typedef int ( containerClass::*GetMethodType )();
350 _pairList = &PolyModeEnumList;
361 template<
class containerClass>
366 using _BaseClass::_pairList;
368 typedef void ( containerClass::*SetMethodType )( int );
369 typedef int ( containerClass::*GetMethodType )();
374 _pairList = &PolyEndEnumList;
385 template<
class containerClass>
390 using _BaseClass::_pairList;
392 typedef void ( containerClass::*SetMethodType )(
const int );
393 typedef int ( containerClass::*GetMethodType )();
398 _pairList = &ShadingEnumList;
403 template<
class containerClass>
408 using _BaseClass::_pairList;
410 typedef void ( containerClass::*SetMethodType )(
const int );
411 typedef int ( containerClass::*GetMethodType )();
425 _pairList = &ColorMaterialModeEnum;
428 virtual GLS_EXPORT
bool OkToWrite()
const {
return false; }
432 template<
class containerClass>
437 using _BaseClass::_pairList;
439 typedef void ( containerClass::*SetMethodType )(
const int );
440 typedef int ( containerClass::*GetMethodType )();
450 _pairList = &ProtectionEnumList;
463 template<
class containerClass>
468 using _BaseClass::_pairList;
470 typedef void ( containerClass::*SetMethodType )(
const int );
471 typedef int ( containerClass::*GetMethodType )();
476 _pairList = &AlphaModeEnumList;
496 virtual GLS_EXPORT ~DistiAttributeString();
499 GLS_EXPORT
char* LocalStorageString();
500 virtual GLS_EXPORT
bool OkToWrite()
const;
502 virtual GLS_EXPORT std::ostream& WriteValue( std::ostream& outstr );
503 virtual GLS_EXPORT std::istream& ReadValue( std::istream& instr );
519 virtual GLS_EXPORT std::string ValueString();
520 virtual GLS_EXPORT
void ValueString(
const std::string& s );
522 virtual GLS_EXPORT std::ostream& WriteValue( std::ostream& outstr );
523 virtual GLS_EXPORT std::istream& ReadValue( std::istream& instr );
537 virtual GLS_EXPORT
bool OkToWrite()
const;
541 virtual GLS_EXPORT std::string ValueString();
542 virtual GLS_EXPORT
void ValueString(
const std::string& s );
544 virtual GLS_EXPORT std::ostream& WriteValue( std::ostream& outstr );
545 virtual GLS_EXPORT std::istream& ReadValue( std::istream& instr );
555 virtual GLS_EXPORT ~DistiAttributeFixedString();
557 virtual GLS_EXPORT std::ostream& WriteValue( std::ostream& outstr );
558 virtual GLS_EXPORT std::istream& ReadValue( std::istream& instr );
564 std::string _localStorageString;
572 virtual GLS_EXPORT ~DistiAttributeStdString();
575 GLS_EXPORT std::string* LocalStorageString();
577 virtual GLS_EXPORT
bool OkToWrite()
const;
579 virtual GLS_EXPORT std::ostream& WriteValue( std::ostream& outstr );
580 virtual GLS_EXPORT std::istream& ReadValue( std::istream& instr );
588 virtual GLS_EXPORT ~DistiAttributeLocation();
590 virtual GLS_EXPORT std::ostream& WriteValue( std::ostream& outstr );
591 virtual GLS_EXPORT std::istream& ReadValue( std::istream& instr );
603 virtual GLS_EXPORT
bool OkToWrite()
const;
606 virtual GLS_EXPORT std::ostream& WriteValue( std::ostream& outstr );
607 virtual GLS_EXPORT std::istream& ReadValue( std::istream& instr );
621 virtual GLS_EXPORT
bool OkToWrite()
const;
624 virtual GLS_EXPORT std::ostream& WriteValue( std::ostream& outstr );
625 virtual GLS_EXPORT std::istream& ReadValue( std::istream& instr );
633 template<
class Map_t>
643 , _attribPtr( attribPtr )
649 , _attribPtr(
new Map_t() )
662 return _attribPtr != 0 && _attribPtr->size();
665 static std::string GetEmptyValue() {
return "$$DISTI_EMPTY$$"; }
670 << DistiAttribDict::SpacingString() <<
"{\n";
671 DistiAttribDict::SpacingInc();
675 typename Map_t::iterator i;
676 for( i = _attribPtr->begin(); i != _attribPtr->end(); ++i )
678 std::ostringstream str;
680 const std::string second = str.str();
682 outstr << DistiAttribDict::SpacingString() << i->first <<
" "
683 << ( second.empty() ? GetEmptyValue() : second ) <<
'\n';
687 DistiAttribDict::SpacingDec();
688 outstr << DistiAttribDict::SpacingString() <<
"}\n";
695 instr.ignore( INT_MAX,
'{' );
699 std::stringstream fontStream;
700 instr.get( *fontStream.rdbuf(),
'}' );
704 while( fontStream.good() )
708 std::stringstream::char_type c;
716 }
while( fontStream.good() && isspace( c ) );
718 if( fontStream.good() )
720 fontStream.putback( c );
722 #if _WIN32 && _MSC_VER < 1300 // if _MSC_VER < vc70
724 Map_t::referent_type value;
726 typename Map_t::key_type key;
727 typename Map_t::mapped_type value;
731 std::getline( fontStream >> std::ws, strVal );
733 if( strVal != GetEmptyValue() )
735 std::istringstream str( strVal );
739 ( *_attribPtr )[ key ] = value;
757 unsigned int* _numVertices;
758 unsigned int _numElements;
760 bool _compatabilityMode;
763 void SetCompatabilityMode(
bool mode ) { _compatabilityMode = mode; }
767 , _attribPtr( attribPtr )
768 , _numVertices( numVertices )
770 , _fixedArray(
false )
772 _compatabilityMode =
true;
777 , _attribPtr(
new Tptr( attribPtr ) )
778 , _numVertices( NULL )
779 , _numElements( numElements )
780 , _fixedArray(
true )
782 _compatabilityMode =
true;
787 if( ( _fixedArray || _localStorage ) && _attribPtr )
794 return ( *_attribPtr != NULL );
799 if( *_attribPtr != NULL )
801 unsigned int numVerts = _numElements;
804 outstr << *_numVertices;
805 numVerts = *_numVertices;
807 DistiAttribDict::SpacingInc();
808 for(
unsigned int i = 0; i < numVerts; i++ )
811 outstr << ( *_attribPtr )[ i ];
813 DistiAttribDict::SpacingDec();
819 unsigned int numVerts = _numElements;
824 *_numVertices = numVerts;
827 if( *_attribPtr != NULL )
828 delete[] * _attribPtr;
832 *_attribPtr =
new T[ numVerts ];
837 if( !_compatabilityMode )
841 instr.getline( buf, 1024 );
844 for(
unsigned int i = 0; i < numVerts; i++ )
846 if( !_compatabilityMode )
849 instr.getline( buf, 1024 );
853 sscanf( buf,
"%f %f %f",
854 &( ( *_attribPtr )[ i ].x ),
855 &( ( *_attribPtr )[ i ].y ),
856 &( ( *_attribPtr )[ i ].z ) );
858 assert( 3 == count );
863 instr >> ( *_attribPtr )[ i ];
875 return DistiAttributeBase::operator==( rArg );
878 if( !( _name == r->
_name ) || _numElements != r->_numElements )
881 for(
unsigned int i = 0u; i < _numElements; ++i )
883 T leftVert = ( *_attribPtr )[ i ];
884 T rightVert = ( *r->_attribPtr )[ i ];
902 unsigned int* _numVertices;
903 unsigned int _numElements;
905 bool _compatabilityMode;
908 void SetCompatabilityMode(
bool mode ) { _compatabilityMode = mode; }
912 , _attribPtr( attribPtr )
913 , _numVertices( numVertices )
915 , _fixedArray(
false )
917 _compatabilityMode =
true;
922 , _attribPtr(
new Tptr( attribPtr ) )
923 , _numVertices( NULL )
924 , _numElements( numElements )
925 , _fixedArray(
true )
927 _compatabilityMode =
true;
932 if( ( _fixedArray || _localStorage ) && _attribPtr )
939 return ( *_attribPtr != NULL );
944 if( *_attribPtr != NULL )
946 unsigned int numVerts = _numElements;
949 outstr << *_numVertices;
950 numVerts = *_numVertices;
952 DistiAttribDict::SpacingInc();
953 for(
unsigned int i = 0; i < numVerts; i++ )
956 outstr << ( *_attribPtr )[ i ];
958 DistiAttribDict::SpacingDec();
964 unsigned int numVerts = _numElements;
969 *_numVertices = numVerts;
972 if( *_attribPtr != NULL )
973 delete[] * _attribPtr;
976 *_attribPtr =
new Vertex[ numVerts ];
979 if( !_compatabilityMode )
983 instr.getline( buf, 1024 );
986 for(
unsigned int i = 0; i < numVerts; i++ )
988 if( !_compatabilityMode )
991 instr.getline( buf, 1024 );
996 sscanf( buf,
"%f %f %f %d %d %d %d",
997 &( ( *_attribPtr )[ i ].x ),
998 &( ( *_attribPtr )[ i ].y ),
999 &( ( *_attribPtr )[ i ].z ),
1002 assert( 7 == count );
1005 ( *_attribPtr )[ i ].color.RGBA( (
unsigned char)r, (
unsigned char)g, (
unsigned char)b, (
unsigned char)a );
1009 instr >> ( *_attribPtr )[ i ];
1021 return DistiAttributeBase::operator==( rArg );
1024 if( !( _name == r->
_name ) || _numElements != r->_numElements )
1027 for(
unsigned int i = 0u; i < _numElements; ++i )
1029 Vertex leftVert = ( *_attribPtr )[ i ];
1030 Vertex rightVert = ( *r->_attribPtr )[ i ];
1055 unsigned int numVerts = _numElements;
1057 for(
unsigned int i = 0; i < numVerts; i++ )
1059 outstr << std::endl;
1060 outstr << ( *_attribPtr )[ i ];
1067 unsigned int numVerts = _numElements;
1069 for(
unsigned int i = 0; i < numVerts; i++ )
1077 std::getline( instr, line );
1079 if( i == 0 && line.length() == 0 )
1080 std::getline( instr, line );
1082 std::stringstream strm( line );
1083 strm >> ( *_attribPtr )[ i ];
1119 , _originalAttribName( originalName )
1120 , _dictionary( dict )
1125 virtual DISTI_EXPORT
bool OkToWrite()
const DISTI_METHOD_OVERRIDE;
1128 virtual DISTI_EXPORT
bool ValueChanged() DISTI_METHOD_OVERRIDE;
1131 virtual DISTI_EXPORT
void ResetValueChanged() DISTI_METHOD_OVERRIDE;
1134 virtual DISTI_EXPORT std::string ValueString() DISTI_METHOD_OVERRIDE;
1137 virtual DISTI_EXPORT
void ValueString(
const std::string& s ) DISTI_METHOD_OVERRIDE;
1140 virtual DISTI_EXPORT
long ValueInt() DISTI_METHOD_OVERRIDE;
1143 virtual DISTI_EXPORT
void ValueInt(
long val ) DISTI_METHOD_OVERRIDE;
1146 virtual DISTI_EXPORT
double ValueFloat() DISTI_METHOD_OVERRIDE;
1149 virtual DISTI_EXPORT
void ValueFloat(
double val ) DISTI_METHOD_OVERRIDE;
1152 virtual DISTI_EXPORT std::ostream& WriteValue( std::ostream& outstr ) DISTI_METHOD_OVERRIDE;
1155 virtual DISTI_EXPORT std::istream& ReadValue( std::istream& instr ) DISTI_METHOD_OVERRIDE;
1158 virtual DISTI_EXPORT
bool operator==(
const DistiAttributeBase& r ) DISTI_METHOD_OVERRIDE;
1163 virtual DISTI_EXPORT
void UnregisterObserver(
CallbackID id ) DISTI_METHOD_OVERRIDE;
1165 virtual DISTI_EXPORT
void NotifyObservers() DISTI_METHOD_OVERRIDE;
1176 template<
class T,
bool showIndex >
1184 , _attribPtr( attribPtr )
1190 , _attribPtr(
new T() )
1202 return ( _attribPtr != NULL && _attribPtr->Size() );
1207 if( _attribPtr != NULL )
1209 int numEntries = _attribPtr->Count();
1210 outstr << numEntries;
1212 DistiAttribDict::SpacingInc();
1214 for(
int i = 0; i < numEntries; i++ )
1216 outstr << std::endl;
1220 outstr << DistiAttribDict::SpacingString() << i <<
" ";
1223 outstr << DistiAttribDict::SpacingString() << ( *_attribPtr )[ i ] <<
" ";
1225 DistiAttribDict::SpacingDec();
1232 instr >> numEntries;
1234 _attribPtr->Count( numEntries );
1236 for(
int i = 0; i < numEntries; i++ )
1243 instr >> ( *_attribPtr )[ entry ];
1254 template<
class T,
bool showIndex >
1265 , _attribPtr( attribPtr )
1272 , _attribPtr(
new T() )
1287 return ( _attribPtr != NULL && _attribPtr->size() );
1292 if( _attribPtr != NULL )
1294 int numEntries = _attribPtr->size();
1295 outstr << numEntries;
1297 DistiAttribDict::SpacingInc();
1299 for(
int i = 0; i < numEntries; i++ )
1301 outstr << std::endl;
1305 outstr << DistiAttribDict::SpacingString() << i <<
" ";
1308 outstr << DistiAttribDict::SpacingString() << ( *_attribPtr )[ i ] <<
" ";
1310 DistiAttribDict::SpacingDec();
1317 if( _attribPtr != NULL )
1320 instr >> numEntries;
1322 _attribPtr->resize( numEntries );
1324 for(
int i = 0; i < numEntries; i++ )
1331 instr >> ( *_attribPtr )[ entry ];
1348 typedef T* ( *CreateItemCb )();
1352 CreateItemCb _createCb;
1359 , _createCb( createCb )
1369 << DistiAttribDict::SpacingString() <<
"{\n";
1370 DistiAttribDict::SpacingInc();
1371 for(
unsigned int i = 0; i < _array->
Count(); i++ )
1373 if( ( *_array )[ i ] )
1375 outstr << DistiAttribDict::SpacingString();
1377 ( ( *_array )[ i ] )->WriteValue( outstr );
1381 DistiAttribDict::SpacingDec();
1382 outstr << DistiAttribDict::SpacingString() <<
"}\n";
1390 while( DistiAttribDict::ScanToken( instr, buf ) )
1400 T* temp =
dynamic_cast<T*
>( _createCb() );
1404 ( *_array )[ _array->
Count() - 1 ]->ReadValue( instr );
1423 template<
class containerT,
class T,
class SetArgT = const T&,
class GetReturnT = T>
1428 typedef void ( containerT::*SetMethodType )( SetArgT );
1429 typedef GetReturnT ( containerT::*GetMethodType )();
1430 typedef GetReturnT ( containerT::*GetMethodConstType )()
const;
1434 containerT* _container;
1435 SetMethodType _setMethod;
1436 GetMethodType _getMethod;
1440 : _BaseClass( NULL, name, attribPtr )
1442 , _container( frame )
1443 , _setMethod( setMethod )
1444 , _getMethod( getMethod )
1447 if(
typeid( T ) ==
typeid(
float ) ||
typeid( T ) ==
typeid(
double ) ||
typeid( T ) ==
typeid(
long double ) )
1455 return ( this->_attribPtr || _getMethod );
1460 virtual std::string
ValueString() DISTI_METHOD_OVERRIDE {
return DistiAttributeBase::ValueString(); }
1461 virtual void ValueString(
const std::string& s ) DISTI_METHOD_OVERRIDE { DistiAttributeBase::ValueString( s ); }
1463 virtual long ValueInt() DISTI_METHOD_OVERRIDE {
return DistiAttributeBase::ValueInt(); }
1464 virtual void ValueInt(
long val ) DISTI_METHOD_OVERRIDE { DistiAttributeBase::ValueInt( val ); }
1466 virtual double ValueFloat() DISTI_METHOD_OVERRIDE {
return DistiAttributeBase::ValueFloat(); }
1467 virtual void ValueFloat(
double val ) DISTI_METHOD_OVERRIDE { DistiAttributeBase::ValueFloat( val ); }
1469 virtual std::ostream&
WriteValue( std::ostream& outstr ) DISTI_METHOD_OVERRIDE
1471 if( _precision > 0 )
1472 outstr.precision(
int( _precision ) );
1474 if( _getMethod && _container )
1477 T* tempAttribPtr = this->_attribPtr;
1480 T temp( ( _container->*_getMethod )() );
1483 this->_attribPtr = &temp;
1486 _BaseClass::WriteValue( outstr );
1489 this->_attribPtr = tempAttribPtr;
1491 else if( this->_attribPtr )
1493 _BaseClass::WriteValue( outstr );
1499 virtual std::istream&
ReadValue( std::istream& instr ) DISTI_METHOD_OVERRIDE
1501 if( _setMethod && _container )
1504 T* tempAttribPtr = this->_attribPtr;
1508 this->_attribPtr = &temp;
1511 _BaseClass::ReadValue( instr );
1514 ( _container->*_setMethod )( temp );
1516 this->_attribPtr = tempAttribPtr;
1518 else if( this->_attribPtr )
1520 _BaseClass::ReadValue( instr );
1528 if( _getMethod && _container )
1531 return ( _container->*_getMethod )();
1533 else if( this->_attribPtr )
1535 return _BaseClass::Value();
1543 virtual void Value(
const T& val ) DISTI_METHOD_OVERRIDE
1545 if( _setMethod && _container )
1547 ( _container->*_setMethod )( val );
1549 else if( this->_attribPtr )
1551 _BaseClass::Value( val );
1568 template<
typename Type,
class Class>
1579 template<
typename Type,
class Class>
1591 template<
typename Type,
class Class>
1602 template<
typename Type,
class Class>
1612 template<
typename Type,
class Class>
1623 template<
typename Type,
class Class>
1635 template<
typename GetReturnT,
typename SetArgT,
class Class>
1646 template<
class Class>
1683 template<
class enumType>
1687 enumType* _attribPtr;
1694 , _attribPtr( attribPtr )
1695 , _pairList( pairList )
1700 , _attribPtr(
new enumType( value ) )
1701 , _pairList( pairList )
1707 if( _localStorage && _attribPtr )
1713 virtual void ValueInt(
long val ) { *_attribPtr = (enumType)val; };
1720 *_attribPtr = ( enumType ) * ( ptr->_attribPtr );
1725 return DistiAttributeBase::operator=( oldClass );
1731 bool foundIt =
false;
1733 typename DistiAttributeEnumDefList::iterator item = _pairList->begin();
1734 while( item != _pairList->end() )
1736 if( ( *item )->_enum == *_attribPtr )
1738 outstr << ( *item )->_string;
1747 outstr << (int)*_attribPtr;
1759 bool foundIt =
false;
1760 typename DistiAttributeEnumDefList::iterator item = _pairList->begin();
1763 while( item != _pairList->end() )
1765 if( strcmp( ( *item )->_string, value ) == 0 )
1767 *_attribPtr = ( enumType )( *item )->_enum;
1779 *_attribPtr = (enumType)atoi( value );
1806 #define DISTI_REGISTER_METHOD_CALLBACK( instance, Class, Method ) \
1808 typedef CallbackMethodCallerTemplate<Class, Class> Caller; \
1809 typedef typename Caller::MethodType1 MethodType; \
1810 const MethodType callback = reinterpret_cast<MethodType>( Method ); \
1811 ThisClass::CallbackCaller( new Caller( callback, instance ) ); \
1821 #define DISTI_SET_OBJECT_CALLBACK1( object, method, parent ) \
1822 ( object )->CallbackCaller( \
1823 new CallbackMethodCallerTemplate<DisplayObject, DisplayObject>( \
1824 ( disti::CallbackMethodCallerTemplate<DisplayObject, DisplayObject>::MethodType1 )( method ), ( parent ) ) );
1835 #define DISTI_ADD_ATTRIBUTE( Type, name, memberVarAddr ) \
1837 static const AttributeName attr( name ); \
1838 CallbackAttributeNotifier<ThisClass> cb( this, attr ); \
1839 this->Attributes().Add( new DistiAttribute<Type>( &cb, ( attr ), ( memberVarAddr ) ) ); \
1854 #define DISTI_ADD_ATTRIBUTE_CALLBACK( Type, name, memberVarAddr, callbackFunction ) \
1856 typedef void ( ThisClass::*Method )(); \
1857 static const AttributeName attr( name ); \
1858 CallbackAttributeNotifier<ThisClass> cb( this, attr, reinterpret_cast<Method>( callbackFunction ) ); \
1859 this->Attributes().Add( new DistiAttribute<Type>( &cb, ( attr ), ( memberVarAddr ) ) ); \
1872 #define DISTI_ADD_ATTRIBUTE_SET_GET( Type, name, setter, getter ) \
1874 static const AttributeName attr( name ); \
1875 this->Attributes().Add( CreateDistiAttributeProperty<Type>( attr, this, setter, getter ) ); \
1885 #define DISTI_ADD_ATTRIBUTE_STRING( name, memberVarAddr ) \
1887 static const AttributeName attr( name ); \
1888 CallbackAttributeNotifier<ThisClass> cb( this, attr ); \
1889 this->Attributes().Add( new DistiAttributeEncodedStdString( &cb, attr, memberVarAddr ) ); \
1901 #define DISTI_ADD_ATTRIBUTE_STRING_CALLBACK( name, memberVarAddr, callbackFunction ) \
1903 typedef void ( ThisClass::*Method )(); \
1904 static const AttributeName attr( name ); \
1905 CallbackAttributeNotifier<ThisClass> cb( this, attr, reinterpret_cast<Method>( callbackFunction ) ); \
1906 this->Attributes().Add( new DistiAttributeEncodedStdString( &cb, attr, memberVarAddr ) ); \
1916 #define DISTI_ADD_ATTRIBUTE_ALIAS( aliasName, origName, obj ) \
1918 static const AttributeName aliasAttr( aliasName ); \
1919 static const AttributeName origAttr( origName ); \
1920 DistiAttribDict& attributes = ( obj )->Attributes(); \
1921 this->Attributes().Add( new DistiAttributeAlias( NULL, aliasAttr, origAttr, &attributes ) ); \
Definition: display_types.h:75
Definition: gls_metadata_attributes.h:241
Definition: gls_metadata_attributes.h:584
Definition: gls_metadata_attributes.h:258
Definition: display_types.h:100
virtual std::ostream & WriteValue(std::ostream &outstr)
Definition: gls_metadata_attributes.h:1366
Definition: display_types.h:73
virtual std::istream & ReadValue(std::istream &instr)
Definition: gls_metadata_attributes.h:1229
Definition: gls_metadata_attributes.h:1660
virtual std::ostream & WriteValue(std::ostream &outstr)
Definition: gls_metadata_attributes.h:797
virtual std::ostream & WriteValue(std::ostream &outstr)
Definition: gls_metadata_attributes.h:1053
The disti::Material class.
Definition: gls_metadata_attributes.h:562
virtual std::istream & ReadValue(std::istream &instr)
Definition: gls_metadata_attributes.h:817
Definition: gls_metadata_attributes.h:283
virtual std::ostream & WriteValue(std::ostream &outstr)
Definition: gls_metadata_attributes.h:942
virtual std::istream & ReadValue(std::istream &instr)
Definition: gls_metadata_attributes.h:1065
The disti::DynamicArray class. A templated array of objects capable of dynamically growing...
Definition: gls_metadata_attributes.h:1255
Definition: gls_metadata_attributes.h:224
Definition: gls_metadata_attributes.h:464
Definition: gls_metadata_attributes.h:386
Definition: display_types.h:153
Definition: gls_metadata_attributes.h:509
Definition: gls_metadata_attributes.h:634
virtual long ValueInt()
Definition: gls_metadata_attributes.h:1712
Definition: display_types.h:151
Definition: display_types.h:91
virtual bool OkToWrite() const
Definition: gls_metadata_attributes.h:660
virtual bool OkToWrite() const
Definition: gls_metadata_attributes.h:1200
Definition: display_types.h:103
Definition: gls_metadata_attributes.h:1684
Definition: display_types.h:92
virtual std::ostream & WriteValue(std::ostream &outstr)
Definition: disti_metadata.h:582
virtual bool operator==(const DistiAttributeBase &rArg)
Definition: gls_metadata_attributes.h:1016
virtual T Value()
Definition: gls_metadata_attributes.h:1526
Definition: gls_metadata_attributes.h:1044
virtual std::istream & ReadValue(std::istream &instr)
Definition: disti_metadata.h:596
virtual std::ostream & WriteValue(std::ostream &outstr)
Definition: gls_metadata_attributes.h:667
virtual std::istream & ReadValue(std::istream &instr)
Definition: gls_metadata_attributes.h:1315
Definition: display_types.h:102
virtual std::string ValueString()
Definition: gls_metadata_attributes.h:1460
void InsertObject(const T &obj, unsigned int loc)
Definition: dynamic_array.h:225
Definition: display_types.h:110
A file for all GL Studio files to include.
Definition: display_types.h:63
Definition: display_types.h:116
The disti::DisplayObject class and global enumerations.
Definition: gls_metadata_attributes.h:897
virtual void ValueString(const std::string &s)
Definition: gls_metadata_attributes.h:1461
unsigned int CallbackID
Type for unique identifiers.
Definition: disti_metadata.h:336
Definition: display_types.h:90
Definition: gls_metadata_attributes.h:1177
Definition: gls_metadata_attributes.h:1345
virtual std::istream & ReadValue(std::istream &instr)
Definition: gls_metadata_attributes.h:1385
Definition: gls_metadata_attributes.h:311
virtual bool OkToWrite() const
Definition: gls_metadata_attributes.h:428
Definition: gls_metadata_attributes.h:1114
Definition: display_types.h:101
Definition: disti_metadata.h:904
Definition: display_types.h:123
virtual void ValueInt(long val)
Definition: gls_metadata_attributes.h:1713
The List_c class. Generic linked list.
virtual std::ostream & WriteValue(std::ostream &outstr)
Definition: gls_metadata_attributes.h:1669
void Count(const unsigned int count)
Definition: dynamic_array.h:115
virtual void Add(DistiAttributeBase *attr)
Definition: display_types.h:152
Definition: display_types.h:64
Definition: display_types.h:62
Definition: gls_metadata_attributes.h:1095
Definition: disti_metadata.h:482
The disti::Vertex class. A class for manipulating 3D vertices.
Generally useful defines, macros, enumerations and function prototypes.
Definition: gls_metadata_attributes.h:1424
Definition: gls_metadata_attributes.h:433
virtual std::ostream & WriteValue(std::ostream &outstr)
Definition: gls_metadata_attributes.h:1729
Definition: disti_metadata.h:180
virtual long ValueInt()
Definition: disti_metadata.h:537
virtual std::ostream & WriteValue(std::ostream &outstr)
Definition: gls_metadata_attributes.h:1469
virtual std::istream & ReadValue(std::istream &instr)
Definition: gls_metadata_attributes.h:962
Definition: disti_metadata.h:163
Definition: display_types.h:61
Definition: gls_metadata_attributes.h:482
virtual double ValueFloat()
Definition: gls_metadata_attributes.h:1466
Definition: disti_metadata.h:673
DistiAttributeProperty< Class, GetReturnT, SetArgT > * CreateDistiAttributeProperty(const AttributeName &attrName, Class *const obj, const typename DistiAttributeProperty< Class, GetReturnT, SetArgT >::SetMethodType setMethod, const typename DistiAttributeProperty< Class, GetReturnT, SetArgT >::GetMethodType getMethod)
Definition: gls_metadata_attributes.h:1636
Definition: disti_metadata.h:892
Definition: callback_caller_base.h:55
DistiAttributeProperty< Class, Vector, const Vertex &, const Vertex & > * CreateDistiAttributePropertyVertexToVector(const AttributeName &attrName, Class *const obj, const typename DistiAttributeProperty< Class, Vector, const Vertex &, const Vertex & >::SetMethodType setMethod, const typename DistiAttributeProperty< Class, Vector, const Vertex &, const Vertex & >::GetMethodConstType getMethod)
Definition: gls_metadata_attributes.h:1647
virtual bool OkToWrite() const
Definition: gls_metadata_attributes.h:1364
virtual std::istream & ReadValue(std::istream &instr)
Definition: gls_metadata_attributes.h:1674
Definition: display_types.h:94
virtual std::istream & ReadValue(std::istream &instr)
Definition: gls_metadata_attributes.h:1499
bool Equal(T1 x, T2 y, float precision=0.001f)
Definition: util.h:226
Definition: display_types.h:71
virtual std::ostream & WriteValue(std::ostream &outstr)
Definition: gls_metadata_attributes.h:1205
virtual bool OkToWrite() const
Definition: gls_metadata_attributes.h:1453
Definition: display_types.h:150
Definition: gls_metadata_attributes.h:595
AttributeName _name
Definition: disti_metadata.h:187
virtual long ValueInt()
Definition: gls_metadata_attributes.h:1463
virtual bool OkToWrite() const
Definition: gls_metadata_attributes.h:937
Definition: display_types.h:117
virtual void ValueFloat(double val)
Definition: gls_metadata_attributes.h:1467
virtual std::istream & ReadValue(std::istream &instr)
Definition: gls_metadata_attributes.h:693
virtual std::ostream & WriteValue(std::ostream &outstr)
Definition: gls_metadata_attributes.h:1290
Definition: display_types.h:93
Definition: gls_metadata_attributes.h:548
Definition: gls_metadata_attributes.h:752
Definition: display_types.h:74
virtual DistiAttributeBase & operator=(const DistiAttributeBase &oldClass)
Definition: gls_metadata_attributes.h:1715
Definition: display_types.h:70
virtual void Value(const T &val)
Definition: gls_metadata_attributes.h:1543
Definition: display_types.h:72
virtual bool OkToWrite() const
Definition: gls_metadata_attributes.h:1107
virtual std::istream & ReadValue(std::istream &instr)
Definition: gls_metadata_attributes.h:1753
Definition: gls_metadata_attributes.h:611
Definition: gls_metadata_attributes.h:404
Definition: gls_metadata_attributes.h:529
Definition: display_types.h:154
Definition: gls_metadata_attributes.h:338
Definition: disti_metadata.h:79
Definition: display_types.h:125
Definition: display_types.h:124
Definition: gls_metadata_attributes.h:362
unsigned int Size() const
Definition: dynamic_array.h:133
Definition: bmpimage.h:46
Definition: display_types.h:149
virtual void ValueInt(long val)
Definition: gls_metadata_attributes.h:1464
virtual bool OkToWrite() const
Definition: gls_metadata_attributes.h:1285
virtual bool operator==(const DistiAttributeBase &rArg)
Definition: gls_metadata_attributes.h:870
Definition: display_types.h:109
virtual bool OkToWrite() const
Definition: gls_metadata_attributes.h:792