117 for (
unsigned int i=0; i<
numAttr; i++) {
151 typedef void* (*t_new)(
void* pos);
152 typedef void* (*t_new_copy)(
void* pos,
void* orig);
153 typedef void (*t_destructor)(
void* pos);
155 virtual void InformAttr_ (
unsigned id,
const char* name,
unsigned size,
const char* type,
const bool isPtr,
156 const t_new,
const t_new_copy,
const t_destructor);
159 inline void InformTypedAttr_(
unsigned id,
const char* name,
unsigned size,
const char *type,
const bool isPtr,
160 const t_new,
const t_new_copy,
const t_destructor,
const Component* ptr);
162 inline void InformTypedAttr_(
unsigned id,
const char* name,
unsigned size,
const char *type,
const bool isPtr,
163 const t_new,
const t_new_copy,
const t_destructor,
const DynamicType* ptr);
165 inline void InformTypedAttr_(
unsigned id,
const char* name,
unsigned size,
const char *type,
const bool isPtr,
166 const t_new,
const t_new_copy,
const t_destructor,
const void* ptr);
168 void AddAttr_ (
const unsigned i,
const unsigned size);
174 virtual const std::type_info &
GetTypeId(
unsigned i)
const=0;
179 return GetPtrToData_(i);
183 return static_cast<const Component *
> (GetPtrToData_(i));
187 return static_cast<Component *
> (GetPtrToData_(i));
241 inline bool ExistAttr(
unsigned id)
const;
267 inline bool AttrHasData(
unsigned i)
const {
return (
dynamicTable[i].offs > -1); };
268 inline void RemoveAllMem();
269 inline void* GetPtrToData_(
const unsigned id)
const;
270 inline void* GetDataAsPtr_(
const unsigned id)
const;
271 inline void SetDataAsPtr_(
const unsigned id,
void* p);
274 void BeMemoryOwner();
280 void UpdateDataByShrinking();
286 void UpdateDataByStandardMode();
291 void UpdateDataGoingToPreAllocatedMode();
296 void UpdateDataInPreAllocatedMode();
302 bool bPreAllocateAllAttributes;
311 template <
unsigned int NAttrib>
320 template <
typename AttribType>
326 template <
typename AttribType>
332 template <
typename AttribType>
339 template <
typename AttribType>
342 return s.
Load (adapter);
344 template <
typename AttribType>
347 return s.
Load (adapter);
349 template <
typename AttribType>
352 return s.
Load (adapter);
360 template <
unsigned int NAttrib>
const int DynamicType::AttributePositionBase<NAttrib>::value = NAttrib;
368 if (!
data)
return false;
374 inline void* DynamicType::GetDataAsPtr_(
const unsigned id)
const
379 inline void* DynamicType::GetPtrToData_(
const unsigned id)
const
384 inline void DynamicType::SetDataAsPtr_(
const unsigned id,
void* p)
395 const t_new fnew,
const t_new_copy fcopy,
const t_destructor fdestr,
const void* ptr)
397 InformAttr_(val, name, size, type, isPtr, fnew, fcopy, fdestr);
404 const t_new fnew,
const t_new_copy fcopy,
const t_destructor fdestr,
const Component* ptr)
406 InformAttr_(val, name, size, type, isPtr, fnew, fcopy, fdestr);
413 const t_new fnew,
const t_new_copy fcopy,
const t_destructor fdestr,
const DynamicType* ptr)
415 InformAttr_(val, name, size, type, isPtr, fnew, fcopy, fdestr);
424 #endif // !defined _DynamicType_