8 #include <boost/multi_array.hpp>
10 #include <boost/archive/text_iarchive.hpp>
11 #include <boost/archive/text_oarchive.hpp>
12 #include <boost/serialization/access.hpp>
21 GuillotineBlock::GuillotineBlock()
27 GuillotineBlock::GuillotineBlock (
const GuillotineBlock&)
34 GuillotineBlock (
const Key_T& iKey) : _key (iKey), _parent (NULL) {
43 std::ostringstream oStr;
63 resize (boost::extents[lNumberOfSegmentCabins*lNumberOfValueTypes]
66 resize (boost::extents[lNumberOfSegmentCabins*lNumberOfValueTypes]
69 resize (boost::extents[lNumberOfSegmentCabins*lNumberOfValueTypes]
72 resize (boost::extents[lNumberOfSegmentCabins*lNumberOfValueTypes]
80 ValueTypeIndexMap_T::const_iterator itVTIdx =
83 return itVTIdx->second;
89 SegmentCabinIndexMap_T::const_iterator itSCIdx =
92 return itSCIdx->second;
99 const DTD_T iDTD)
const {
101 const unsigned int lValueIdxBegin = iSCIdxBegin * lNbOfValueTypes;
102 const unsigned int lValueIdxEnd = (iSCIdxEnd + 1) * lNbOfValueTypes;
111 const DTD_T iDTDBegin,
const DTD_T iDTDEnd)
const {
112 const unsigned int lNbOfValueTypes = _valueTypesIndexMap.size();
113 const unsigned int lValueIdxBegin = iSCIdxBegin * lNbOfValueTypes;
114 const unsigned int lValueIdxEnd = (iSCIdxEnd +1) * lNbOfValueTypes;
125 const unsigned int lValueIdxBegin = iSCIdxBegin * lNbOfValueTypes;
126 const unsigned int lValueIdxEnd = (iSCIdxEnd + 1) * lNbOfValueTypes;
135 const DTD_T iDTDBegin,
136 const DTD_T iDTDEnd) {
138 const unsigned int lValueIdxBegin = iSCIdxBegin * lNbOfValueTypes;
139 const unsigned int lValueIdxEnd = (iSCIdxEnd + 1) * lNbOfValueTypes;
148 const DTD_T iDTD)
const {
150 const unsigned int lValueIdxBegin = iSCIdxBegin * lNbOfValueTypes;
151 const unsigned int lValueIdxEnd = (iSCIdxEnd + 1) * lNbOfValueTypes;
160 const DTD_T iDTDBegin,
const DTD_T iDTDEnd)
const {
161 const unsigned int lNbOfValueTypes = _valueTypesIndexMap.size();
162 const unsigned int lValueIdxBegin = iSCIdxBegin * lNbOfValueTypes;
163 const unsigned int lValueIdxEnd = (iSCIdxEnd +1) * lNbOfValueTypes;
174 const unsigned int lValueIdxBegin = iSCIdxBegin * lNbOfValueTypes;
175 const unsigned int lValueIdxEnd = (iSCIdxEnd + 1) * lNbOfValueTypes;
184 const DTD_T iDTDBegin,
185 const DTD_T iDTDEnd) {
187 const unsigned int lValueIdxBegin = iSCIdxBegin * lNbOfValueTypes;
188 const unsigned int lValueIdxEnd = (iSCIdxEnd + 1) * lNbOfValueTypes;
197 const DTD_T iDTD)
const {
199 const unsigned int lValueIdxBegin = iSCIdxBegin * lNbOfValueTypes;
200 const unsigned int lValueIdxEnd = (iSCIdxEnd + 1) * lNbOfValueTypes;
209 const DTD_T iDTDBegin,
const DTD_T iDTDEnd)
const {
210 const unsigned int lNbOfValueTypes = _valueTypesIndexMap.size();
211 const unsigned int lValueIdxBegin = iSCIdxBegin * lNbOfValueTypes;
212 const unsigned int lValueIdxEnd = (iSCIdxEnd +1) * lNbOfValueTypes;
223 const unsigned int lValueIdxBegin = iSCIdxBegin * lNbOfValueTypes;
224 const unsigned int lValueIdxEnd = (iSCIdxEnd + 1) * lNbOfValueTypes;
233 const DTD_T iDTDBegin,
234 const DTD_T iDTDEnd) {
236 const unsigned int lValueIdxBegin = iSCIdxBegin * lNbOfValueTypes;
237 const unsigned int lValueIdxEnd = (iSCIdxEnd + 1) * lNbOfValueTypes;
246 const DTD_T iDTD)
const {
248 const unsigned int lValueIdxBegin = iSCIdxBegin * lNbOfValueTypes;
249 const unsigned int lValueIdxEnd = (iSCIdxEnd + 1) * lNbOfValueTypes;
258 const DTD_T iDTDBegin,
const DTD_T iDTDEnd)
const {
259 const unsigned int lNbOfValueTypes = _valueTypesIndexMap.size();
260 const unsigned int lValueIdxBegin = iSCIdxBegin * lNbOfValueTypes;
261 const unsigned int lValueIdxEnd = (iSCIdxEnd +1) * lNbOfValueTypes;
272 const unsigned int lValueIdxBegin = iSCIdxBegin * lNbOfValueTypes;
273 const unsigned int lValueIdxEnd = (iSCIdxEnd + 1) * lNbOfValueTypes;
282 const DTD_T iDTDBegin,
283 const DTD_T iDTDEnd) {
285 const unsigned int lValueIdxBegin = iSCIdxBegin * lNbOfValueTypes;
286 const unsigned int lValueIdxEnd = (iSCIdxEnd + 1) * lNbOfValueTypes;
292 void GuillotineBlock::serialisationImplementationExport()
const {
293 std::ostringstream oStr;
294 boost::archive::text_oarchive oa (oStr);
299 void GuillotineBlock::serialisationImplementationImport() {
300 std::istringstream iStr;
301 boost::archive::text_iarchive ia (iStr);
306 template<
class Archive>
308 const unsigned int iFileVersion) {