49 : _scheme(scheme), _scopePools(_scheme.GetNScopes(),(
ScopePool*)0)
64 _scopePools[scopeIndex] =
new ScopePool(scope, size);
71 (
"Getting the size of scope '"+scopeName+
"' but it is not populated").c_str());
72 return _scopePools[scopeIndex]->GetSize();
75 void Insert(
const std::string & scopeName,
unsigned pos)
79 _scopePools[scopeIndex]->Insert(pos);
81 void Remove(
const std::string & scopeName,
unsigned pos)
85 _scopePools[scopeIndex]->Remove(pos);
95 (
"Instantianting '"+scopeName+
":"+attributeName+
"' but the scope is not yet populated").c_str());
104 template <
typename AttributeType>
105 AttributeType *
GetWritePool(
const std::string & scopeName,
const std::string & attributeName)
110 (
"Writting data on '"+scopeName+
":"+attributeName+
"' but the scope is not yet populated").c_str());
112 return _scopePools[scopeIndex]->template GetWritePool<AttributeType>(attributeName);
122 template <
typename AttributeType>
123 const AttributeType *
GetReadPool(
const std::string & scopeName,
const std::string & attributeName)
const
128 (
"Reading data from '"+scopeName+
":"+attributeName+
"' but the scope is not yet populated").c_str());
130 return _scopePools[scopeIndex]->template GetReadPool<AttributeType>(attributeName);
132 bool IsInstantiated(
const std::string & scopeName,
const std::string & attributeName)
const
135 if (!_scopePools[scopeIndex])
return false;
136 return _scopePools[scopeIndex]->IsInstantiated(attributeName);
143 for (
unsigned i = 0; i<_scopePools.size(); i++)
146 storage.
Store(adapter);
151 for (
unsigned i = 0; i<_scopePools.size(); i++)
156 storage.
Load(adapter);
162 typedef std::vector<ScopePool*> ScopePools;
163 ScopePools _scopePools;