| #define foreach | ( | var, | |||
| cont | ) |
Value:
for( const GTLCore::Details::ForeachInfoBase& contInfo = GTLCore::Details::CreateForeachInfo( cont ); \ not GTLCore::Details::getForeachInfo( &contInfo, true ? 0 : GTLCore::Details::getForeachType(cont) )->finished(); \ GTLCore::Details::getForeachInfo( &contInfo, true ? 0 : GTLCore::Details::getForeachType(cont) )->next() ) \ for( var = *GTLCore::Details::getForeachInfo( &contInfo, true ? 0 : GTLCore::Details::getForeachType(cont) )->it; \ GTLCore::Details::getForeachInfo( &contInfo, true ? 0 : GTLCore::Details::getForeachType(cont) )->count < 1; \ ++GTLCore::Details::getForeachInfo( &contInfo, true ? 0 : GTLCore::Details::getForeachType(cont) )->count )
For internal use only.
Macro to easilly iterate over elements of a countainer.
std::vector\<Object\> objects; foreach(const Object& object, objects) { ... }
| #define STATIC_DELETER | ( | _name_ | ) |
Value:
class _name_##Deleter { \ public: \ _name_##Deleter() {} \ ~_name_##Deleter(); \ }; \ _name_##Deleter instance##_name_ ; \ _name_##Deleter::~_name_##Deleter()
For internal use only.
Allows to execute code at library deletion.
class CoolObject {}; static std::vector\<CoolObject*\> staticCoolInstances; STATIC_DELETER( CoolObjects ) { for(int i =0; i \< staticCoolInstances.size(); ++i) delete staticCoolInstances[i]; }
This will create a CoolObjectsDeleter that you can use to declare a friend class.
| #define STATIC_INITIALISATION | ( | _name_ | ) |
Value:
class _name_##Factory { \ public: \ _name_##Factory(); \ }; \ _name_##Factory instance##_name_ ; \ _name_##Factory::_name_##Factory()
For internal use only.
Allows to execute code at library initialisation.
class CoolObject {}; static std::vector\<CoolObject*\> staticCoolInstances; STATIC_INITIALISATION( CoolObjects ) { for(int i =0; i < 10; ++i) staticCoolInstances.push_back( new CoolObject() ); }
This will create a CoolObjectsFactory that you can use to declare a friend class.
| #define STATIC_POINTER | ( | _type_, | |||
| _name_ | ) |
Value:
namespace { \ class StaticPointer##_type_ { \ _type_* t; \ StaticPointer##_type_(const StaticPointer##_type_& ); \ StaticPointer##_type_& operator=(const StaticPointer##_type_& ); \ public: \ StaticPointer##_type_() : t(0) {} \ ~StaticPointer##_type_() { delete t; t = 0; } \ inline operator _type_*() { return t; } \ inline _type_* operator->() { return t; } \ StaticPointer##_type_& operator=(_type_* _t) { t = _t; return *this; } \ }; \ StaticPointer##_type_ _name_; \ }
For internal use only.
Used for static pointer that are deleted at exit time.
| void GTLCore::deleteAll | ( | _Type_ & | list | ) | [inline] |
For internal use only.
Delete all pointers of a list or a vector.
| void GTLCore::deleteAllSecondMember | ( | _Type_ & | map | ) | [inline] |
For internal use only.
Delete all second members of a map
| GTLCORE_EXPORT GTLCore::half float2half | ( | float | f | ) |
For internal use only.
This function convert from float to half. It's private to OpenGTL, if you want to use half channels in your application, you are invited to use IlmBase (http://www.openexr.com/).
| ArrayWrap* gtlAllocateArray | ( | int | _size | ) | [inline] |
For internal use only.
This template function allow to create an array of elements _T_ this function will call the GTLCore::MemoryManager function as needed.
| _size | is the number of elements in the array |
References ArrayWrap::data, and ArrayWrap::size.
| void gtlFreeAllArray | ( | ArrayWrap * | aw | ) | [inline] |
For internal use only.
Free the memory used by an array of pointers, and by its members.
References ArrayWrap::data, and ArrayWrap::size.
| void gtlFreeArray | ( | ArrayWrap * | aw | ) | [inline] |
| GTLCORE_EXPORT float half2float | ( | GTLCore::half | v | ) |
For internal use only.
This function convert from half to float. It's private to OpenGTL, if you want to use half channels in your application, you are invited to use IlmBase (http://www.openexr.com/).
1.5.6