Renamed some stuff.

test
cc9cii 10 years ago
parent 41b368a759
commit ef84e553be

@ -25,7 +25,7 @@ opencs_units (model/world
opencs_units_noqt (model/world
universalid record commands columnbase scriptcontext cell refidcollection
refidadapter refiddata refidadapterimp ref collectionbase refcollection columns infocollection tablemimedata cellcoordinates cellselection resources resourcesmanager scope
pathgrid landtexture land nestedtablewrapper nestedadapters nestedcollection idadapterimp
pathgrid landtexture land nestedtablewrapper nestedadapters nestedcollection nestedcoladapterimp
)
opencs_hdrs_noqt (model/world

@ -18,7 +18,7 @@
#include "columns.hpp"
#include "resourcesmanager.hpp"
#include "resourcetable.hpp"
#include "idadapterimp.hpp"
#include "nestedcoladapterimp.hpp"
void CSMWorld::Data::addModel (QAbstractItemModel *model, UniversalId::Type type, bool update)
{
@ -64,6 +64,8 @@ CSMWorld::Data::Data (ToUTF8::FromType encoding, const ResourcesManager& resourc
: mEncoder (encoding), mPathgrids (mCells), mRefs (mCells),
mResourcesManager (resourcesManager), mReader (0), mDialogue (0), mReaderIndex(0)
{
int index = 0;
mGlobals.addColumn (new StringIdColumn<ESM::Global>);
mGlobals.addColumn (new RecordStateColumn<ESM::Global>);
mGlobals.addColumn (new FixedRecordTypeColumn<ESM::Global> (UniversalId::Type_Global));
@ -109,14 +111,13 @@ CSMWorld::Data::Data (ToUTF8::FromType encoding, const ResourcesManager& resourc
for (int i=0; i<7; ++i)
mFactions.addColumn (new SkillsColumn<ESM::Faction> (i));
// Faction Reactions
NestedParentColumn<ESM::Faction> *reactions =
new NestedParentColumn<ESM::Faction> (Columns::ColumnId_FactionReactions);
mFactions.addColumn (reactions);
mFactions.addAdapter (std::make_pair(reactions, new FactionReactionsAdapter ()));
mFactions.getNestableColumn(mFactions.getColumns()-1)->addColumn(
new NestedChildColumn (Columns::ColumnId_Faction, ColumnBase::Display_String));
mFactions.getNestableColumn(mFactions.getColumns()-1)->addColumn(
new NestedChildColumn (Columns::ColumnId_FactionReaction, ColumnBase::Display_Integer));
mFactions.addColumn (new NestedParentColumn<ESM::Faction> (Columns::ColumnId_FactionReactions));
index = mFactions.getColumns()-1;
mFactions.addAdapter (std::make_pair(&mFactions.getColumn(index), new FactionReactionsAdapter ()));
mFactions.getNestableColumn(index)->addColumn(
new NestedChildColumn (Columns::ColumnId_Faction, ColumnBase::Display_String));
mFactions.getNestableColumn(index)->addColumn(
new NestedChildColumn (Columns::ColumnId_FactionReaction, ColumnBase::Display_Integer));
mRaces.addColumn (new StringIdColumn<ESM::Race>);
mRaces.addColumn (new RecordStateColumn<ESM::Race>);
@ -130,12 +131,11 @@ CSMWorld::Data::Data (ToUTF8::FromType encoding, const ResourcesManager& resourc
mRaces.addColumn (new WeightHeightColumn<ESM::Race> (false, true));
mRaces.addColumn (new WeightHeightColumn<ESM::Race> (false, false));
// Race spells
NestedParentColumn<ESM::Race> *raceSpells =
new NestedParentColumn<ESM::Race> (Columns::ColumnId_SpellList);
mRaces.addColumn (raceSpells);
mRaces.addAdapter (std::make_pair(raceSpells, new SpellListAdapter<ESM::Race> ()));
mRaces.getNestableColumn(mRaces.getColumns()-1)->addColumn(
new NestedChildColumn (Columns::ColumnId_SpellId, ColumnBase::Display_String));
mRaces.addColumn (new NestedParentColumn<ESM::Race> (Columns::ColumnId_SpellList));
index = mRaces.getColumns()-1;
mRaces.addAdapter (std::make_pair(&mRaces.getColumn(index), new SpellListAdapter<ESM::Race> ()));
mRaces.getNestableColumn(index)->addColumn(
new NestedChildColumn (Columns::ColumnId_SpellId, ColumnBase::Display_String));
mSounds.addColumn (new StringIdColumn<ESM::Sound>);
mSounds.addColumn (new RecordStateColumn<ESM::Sound>);
@ -157,14 +157,13 @@ CSMWorld::Data::Data (ToUTF8::FromType encoding, const ResourcesManager& resourc
mRegions.addColumn (new MapColourColumn<ESM::Region>);
mRegions.addColumn (new SleepListColumn<ESM::Region>);
// Region Sounds
NestedParentColumn<ESM::Region> *soundList =
new NestedParentColumn<ESM::Region> (Columns::ColumnId_RegionSounds);
mRegions.addColumn (soundList);
mRegions.addAdapter (std::make_pair(soundList, new RegionSoundListAdapter ()));
mRegions.getNestableColumn(mRegions.getColumns()-1)->addColumn(
new NestedChildColumn (Columns::ColumnId_SoundName, ColumnBase::Display_String));
mRegions.getNestableColumn(mRegions.getColumns()-1)->addColumn(
new NestedChildColumn (Columns::ColumnId_SoundChance, ColumnBase::Display_Integer));
mRegions.addColumn (new NestedParentColumn<ESM::Region> (Columns::ColumnId_RegionSounds));
index = mRegions.getColumns()-1;
mRegions.addAdapter (std::make_pair(&mRegions.getColumn(index), new RegionSoundListAdapter ()));
mRegions.getNestableColumn(index)->addColumn(
new NestedChildColumn (Columns::ColumnId_SoundName, ColumnBase::Display_String));
mRegions.getNestableColumn(index)->addColumn(
new NestedChildColumn (Columns::ColumnId_SoundChance, ColumnBase::Display_Integer));
mBirthsigns.addColumn (new StringIdColumn<ESM::BirthSign>);
mBirthsigns.addColumn (new RecordStateColumn<ESM::BirthSign>);
@ -173,12 +172,12 @@ CSMWorld::Data::Data (ToUTF8::FromType encoding, const ResourcesManager& resourc
mBirthsigns.addColumn (new TextureColumn<ESM::BirthSign>);
mBirthsigns.addColumn (new DescriptionColumn<ESM::BirthSign>);
// Birthsign spells
NestedParentColumn<ESM::BirthSign> *birthSpells =
new NestedParentColumn<ESM::BirthSign> (Columns::ColumnId_SpellList);
mBirthsigns.addColumn (birthSpells);
mBirthsigns.addAdapter (std::make_pair(birthSpells, new SpellListAdapter<ESM::BirthSign> ()));
mBirthsigns.getNestableColumn(mBirthsigns.getColumns()-1)->addColumn(
new NestedChildColumn (Columns::ColumnId_SpellId, ColumnBase::Display_String));
mBirthsigns.addColumn (new NestedParentColumn<ESM::BirthSign> (Columns::ColumnId_SpellList));
index = mBirthsigns.getColumns()-1;
mBirthsigns.addAdapter (std::make_pair(&mBirthsigns.getColumn(index),
new SpellListAdapter<ESM::BirthSign> ()));
mBirthsigns.getNestableColumn(index)->addColumn(
new NestedChildColumn (Columns::ColumnId_SpellId, ColumnBase::Display_String));
mSpells.addColumn (new StringIdColumn<ESM::Spell>);
mSpells.addColumn (new RecordStateColumn<ESM::Spell>);
@ -190,26 +189,25 @@ CSMWorld::Data::Data (ToUTF8::FromType encoding, const ResourcesManager& resourc
mSpells.addColumn (new FlagColumn<ESM::Spell> (Columns::ColumnId_StarterSpell, 0x2));
mSpells.addColumn (new FlagColumn<ESM::Spell> (Columns::ColumnId_AlwaysSucceeds, 0x4));
// Spell effects
NestedParentColumn<ESM::Spell> *spellEffect =
new NestedParentColumn<ESM::Spell> (Columns::ColumnId_EffectList);
mSpells.addColumn (spellEffect);
mSpells.addAdapter (std::make_pair(spellEffect, new EffectsListAdapter<ESM::Spell> ()));
mSpells.getNestableColumn(mSpells.getColumns()-1)->addColumn(
new NestedChildColumn (Columns::ColumnId_EffectId, ColumnBase::Display_String/*, false*/)); // false means no edit
mSpells.getNestableColumn(mSpells.getColumns()-1)->addColumn(
new NestedChildColumn (Columns::ColumnId_Skill, ColumnBase::Display_String));
mSpells.getNestableColumn(mSpells.getColumns()-1)->addColumn(
new NestedChildColumn (Columns::ColumnId_Attribute, ColumnBase::Display_String)); // reuse attribute
mSpells.getNestableColumn(mSpells.getColumns()-1)->addColumn(
new NestedChildColumn (Columns::ColumnId_EffectRange, ColumnBase::Display_Integer));
mSpells.getNestableColumn(mSpells.getColumns()-1)->addColumn(
new NestedChildColumn (Columns::ColumnId_EffectArea, ColumnBase::Display_String));
mSpells.getNestableColumn(mSpells.getColumns()-1)->addColumn(
new NestedChildColumn (Columns::ColumnId_Duration, ColumnBase::Display_Integer)); // reuse from light
mSpells.getNestableColumn(mSpells.getColumns()-1)->addColumn(
new NestedChildColumn (Columns::ColumnId_MinRange, ColumnBase::Display_Integer)); // reuse from sound
mSpells.getNestableColumn(mSpells.getColumns()-1)->addColumn(
new NestedChildColumn (Columns::ColumnId_MaxRange, ColumnBase::Display_Integer)); // reuse from sound
mSpells.addColumn (new NestedParentColumn<ESM::Spell> (Columns::ColumnId_EffectList));
index = mSpells.getColumns()-1;
mSpells.addAdapter (std::make_pair(&mSpells.getColumn(index), new EffectsListAdapter<ESM::Spell> ()));
mSpells.getNestableColumn(index)->addColumn(
new NestedChildColumn (Columns::ColumnId_EffectId, ColumnBase::Display_String/*, false*/)); // false means no edit
mSpells.getNestableColumn(index)->addColumn(
new NestedChildColumn (Columns::ColumnId_Skill, ColumnBase::Display_String));
mSpells.getNestableColumn(index)->addColumn(
new NestedChildColumn (Columns::ColumnId_Attribute, ColumnBase::Display_String)); // reuse attribute
mSpells.getNestableColumn(index)->addColumn(
new NestedChildColumn (Columns::ColumnId_EffectRange, ColumnBase::Display_Integer));
mSpells.getNestableColumn(index)->addColumn(
new NestedChildColumn (Columns::ColumnId_EffectArea, ColumnBase::Display_String));
mSpells.getNestableColumn(index)->addColumn(
new NestedChildColumn (Columns::ColumnId_Duration, ColumnBase::Display_Integer)); // reuse from light
mSpells.getNestableColumn(index)->addColumn(
new NestedChildColumn (Columns::ColumnId_MinRange, ColumnBase::Display_Integer)); // reuse from sound
mSpells.getNestableColumn(index)->addColumn(
new NestedChildColumn (Columns::ColumnId_MaxRange, ColumnBase::Display_Integer)); // reuse from sound
mTopics.addColumn (new StringIdColumn<ESM::Dialogue>);
mTopics.addColumn (new RecordStateColumn<ESM::Dialogue>);
@ -264,26 +262,26 @@ CSMWorld::Data::Data (ToUTF8::FromType encoding, const ResourcesManager& resourc
mEnchantments.addColumn (new ChargesColumn2<ESM::Enchantment>);
mEnchantments.addColumn (new AutoCalcColumn<ESM::Enchantment>);
// Enchantment effects
NestedParentColumn<ESM::Enchantment> *enchantmentEffect =
new NestedParentColumn<ESM::Enchantment> (Columns::ColumnId_EffectList);
mEnchantments.addColumn (enchantmentEffect);
mEnchantments.addAdapter (std::make_pair(enchantmentEffect, new EffectsListAdapter<ESM::Enchantment> ()));
mEnchantments.getNestableColumn(mEnchantments.getColumns()-1)->addColumn(
new NestedChildColumn (Columns::ColumnId_EffectId, ColumnBase::Display_String/*, false*/));
mEnchantments.getNestableColumn(mEnchantments.getColumns()-1)->addColumn(
new NestedChildColumn (Columns::ColumnId_Skill, ColumnBase::Display_String));
mEnchantments.getNestableColumn(mEnchantments.getColumns()-1)->addColumn(
new NestedChildColumn (Columns::ColumnId_Attribute, ColumnBase::Display_String)); // reuse attribute
mEnchantments.getNestableColumn(mEnchantments.getColumns()-1)->addColumn(
new NestedChildColumn (Columns::ColumnId_EffectRange, ColumnBase::Display_Integer));
mEnchantments.getNestableColumn(mEnchantments.getColumns()-1)->addColumn(
new NestedChildColumn (Columns::ColumnId_EffectArea, ColumnBase::Display_String));
mEnchantments.getNestableColumn(mEnchantments.getColumns()-1)->addColumn(
new NestedChildColumn (Columns::ColumnId_Duration, ColumnBase::Display_Integer)); // reuse from light
mEnchantments.getNestableColumn(mEnchantments.getColumns()-1)->addColumn(
new NestedChildColumn (Columns::ColumnId_MinRange, ColumnBase::Display_Integer)); // reuse from sound
mEnchantments.getNestableColumn(mEnchantments.getColumns()-1)->addColumn(
new NestedChildColumn (Columns::ColumnId_MaxRange, ColumnBase::Display_Integer)); // reuse from sound
mEnchantments.addColumn (new NestedParentColumn<ESM::Enchantment> (Columns::ColumnId_EffectList));
index = mEnchantments.getColumns()-1;
mEnchantments.addAdapter (std::make_pair(&mEnchantments.getColumn(index),
new EffectsListAdapter<ESM::Enchantment> ()));
mEnchantments.getNestableColumn(index)->addColumn(
new NestedChildColumn (Columns::ColumnId_EffectId, ColumnBase::Display_String/*, false*/));
mEnchantments.getNestableColumn(index)->addColumn(
new NestedChildColumn (Columns::ColumnId_Skill, ColumnBase::Display_String));
mEnchantments.getNestableColumn(index)->addColumn(
new NestedChildColumn (Columns::ColumnId_Attribute, ColumnBase::Display_String)); // reuse attribute
mEnchantments.getNestableColumn(index)->addColumn(
new NestedChildColumn (Columns::ColumnId_EffectRange, ColumnBase::Display_Integer));
mEnchantments.getNestableColumn(index)->addColumn(
new NestedChildColumn (Columns::ColumnId_EffectArea, ColumnBase::Display_String));
mEnchantments.getNestableColumn(index)->addColumn(
new NestedChildColumn (Columns::ColumnId_Duration, ColumnBase::Display_Integer)); // reuse from light
mEnchantments.getNestableColumn(index)->addColumn(
new NestedChildColumn (Columns::ColumnId_MinRange, ColumnBase::Display_Integer)); // reuse from sound
mEnchantments.getNestableColumn(index)->addColumn(
new NestedChildColumn (Columns::ColumnId_MaxRange, ColumnBase::Display_Integer)); // reuse from sound
mBodyParts.addColumn (new StringIdColumn<ESM::BodyPart>);
mBodyParts.addColumn (new RecordStateColumn<ESM::BodyPart>);
@ -331,31 +329,29 @@ CSMWorld::Data::Data (ToUTF8::FromType encoding, const ResourcesManager& resourc
mPathgrids.addColumn (new FixedRecordTypeColumn<Pathgrid> (UniversalId::Type_Pathgrid));
// new object deleted in dtor of Collection<T,A>
NestedParentColumn<Pathgrid> *pointList =
new NestedParentColumn<Pathgrid> (Columns::ColumnId_PathgridPoints);
mPathgrids.addColumn (pointList);
// new object deleted in dtor of SubCellCollection<T,A>
mPathgrids.addAdapter (std::make_pair(pointList, new PathgridPointListAdapter ()));
mPathgrids.addColumn (new NestedParentColumn<Pathgrid> (Columns::ColumnId_PathgridPoints));
index = mPathgrids.getColumns()-1;
// new object deleted in dtor of NestedCollection<T,A>
mPathgrids.addAdapter (std::make_pair(&mPathgrids.getColumn(index), new PathgridPointListAdapter ()));
// new objects deleted in dtor of NestableColumn
// WARNING: The order of the columns below are assumed in PathgridPointListAdapter
mPathgrids.getNestableColumn(mPathgrids.getColumns()-1)->addColumn(
mPathgrids.getNestableColumn(index)->addColumn(
new NestedChildColumn (Columns::ColumnId_PathgridIndex, ColumnBase::Display_Integer, false));
mPathgrids.getNestableColumn(mPathgrids.getColumns()-1)->addColumn(
mPathgrids.getNestableColumn(index)->addColumn(
new NestedChildColumn (Columns::ColumnId_PathgridPosX, ColumnBase::Display_Integer));
mPathgrids.getNestableColumn(mPathgrids.getColumns()-1)->addColumn(
mPathgrids.getNestableColumn(index)->addColumn(
new NestedChildColumn (Columns::ColumnId_PathgridPosY, ColumnBase::Display_Integer));
mPathgrids.getNestableColumn(mPathgrids.getColumns()-1)->addColumn(
mPathgrids.getNestableColumn(index)->addColumn(
new NestedChildColumn (Columns::ColumnId_PathgridPosZ, ColumnBase::Display_Integer));
NestedParentColumn<Pathgrid> *edgeList =
new NestedParentColumn<Pathgrid> (Columns::ColumnId_PathgridEdges);
mPathgrids.addColumn (edgeList);
mPathgrids.addAdapter (std::make_pair(edgeList, new PathgridEdgeListAdapter ()));
mPathgrids.getNestableColumn(mPathgrids.getColumns()-1)->addColumn(
mPathgrids.addColumn (new NestedParentColumn<Pathgrid> (Columns::ColumnId_PathgridEdges));
index = mPathgrids.getColumns()-1;
mPathgrids.addAdapter (std::make_pair(&mPathgrids.getColumn(index), new PathgridEdgeListAdapter ()));
mPathgrids.getNestableColumn(index)->addColumn(
new NestedChildColumn (Columns::ColumnId_PathgridEdgeIndex, ColumnBase::Display_Integer, false));
mPathgrids.getNestableColumn(mPathgrids.getColumns()-1)->addColumn(
mPathgrids.getNestableColumn(index)->addColumn(
new NestedChildColumn (Columns::ColumnId_PathgridEdge0, ColumnBase::Display_Integer));
mPathgrids.getNestableColumn(mPathgrids.getColumns()-1)->addColumn(
mPathgrids.getNestableColumn(index)->addColumn(
new NestedChildColumn (Columns::ColumnId_PathgridEdge1, ColumnBase::Display_Integer));
mStartScripts.addColumn (new StringIdColumn<ESM::StartScript>);

@ -1,4 +1,4 @@
#include "idadapterimp.hpp"
#include "nestedcoladapterimp.hpp"
#include <components/esm/loadregn.hpp>
#include <components/esm/loadfact.hpp>

@ -1,5 +1,5 @@
#ifndef CSM_WOLRD_IDADAPTERIMP_H
#define CSM_WOLRD_IDADAPTERIMP_H
#ifndef CSM_WOLRD_NESTEDCOLADAPTERIMP_H
#define CSM_WOLRD_NESTEDCOLADAPTERIMP_H
#include <QVariant>
@ -9,7 +9,7 @@
#include <components/esm/loadskil.hpp> // for converting skill names
#include <components/esm/attr.hpp> // for converting attributes
#include "idadapter.hpp"
#include "nestedcolumnadapter.hpp"
#include "nestedtablewrapper.hpp"
namespace ESM
@ -37,7 +37,7 @@ namespace CSMWorld
}
};
class PathgridPointListAdapter : public NestedIdAdapter<Pathgrid>
class PathgridPointListAdapter : public NestedColumnAdapter<Pathgrid>
{
public:
PathgridPointListAdapter ();
@ -62,7 +62,7 @@ namespace CSMWorld
virtual int getNestedRowsCount(const Record<Pathgrid>& record) const;
};
class PathgridEdgeListAdapter : public NestedIdAdapter<Pathgrid>
class PathgridEdgeListAdapter : public NestedColumnAdapter<Pathgrid>
{
public:
PathgridEdgeListAdapter ();
@ -87,7 +87,7 @@ namespace CSMWorld
virtual int getNestedRowsCount(const Record<Pathgrid>& record) const;
};
class FactionReactionsAdapter : public NestedIdAdapter<ESM::Faction>
class FactionReactionsAdapter : public NestedColumnAdapter<ESM::Faction>
{
public:
FactionReactionsAdapter ();
@ -112,7 +112,7 @@ namespace CSMWorld
virtual int getNestedRowsCount(const Record<ESM::Faction>& record) const;
};
class RegionSoundListAdapter : public NestedIdAdapter<ESM::Region>
class RegionSoundListAdapter : public NestedColumnAdapter<ESM::Region>
{
public:
RegionSoundListAdapter ();
@ -138,7 +138,7 @@ namespace CSMWorld
};
template<typename ESXRecordT>
class SpellListAdapter : public NestedIdAdapter<ESXRecordT>
class SpellListAdapter : public NestedColumnAdapter<ESXRecordT>
{
public:
SpellListAdapter () {}
@ -234,7 +234,7 @@ namespace CSMWorld
};
template<typename ESXRecordT>
class EffectsListAdapter : public NestedIdAdapter<ESXRecordT>
class EffectsListAdapter : public NestedColumnAdapter<ESXRecordT>
{
public:
EffectsListAdapter () {}
@ -476,4 +476,4 @@ namespace CSMWorld
};
}
#endif // CSM_WOLRD_IDADAPTERIMP_H
#endif // CSM_WOLRD_NESTEDCOLADAPTERIMP_H

@ -1,7 +1,5 @@
#ifndef CSM_WOLRD_IDADAPTER_H
#define CSM_WOLRD_IDADAPTER_H
#include "record.hpp"
#ifndef CSM_WOLRD_NESTEDCOLUMNADAPTER_H
#define CSM_WOLRD_NESTEDCOLUMNADAPTER_H
class QVariant;
@ -9,14 +7,17 @@ namespace CSMWorld
{
struct NestedTableWrapperBase;
template <typename ESXRecordT>
struct Record;
template<typename ESXRecordT>
class NestedIdAdapter
class NestedColumnAdapter
{
public:
NestedIdAdapter() {}
NestedColumnAdapter() {}
virtual ~NestedIdAdapter() {}
virtual ~NestedColumnAdapter() {}
virtual void addNestedRow(Record<ESXRecordT>& record, int position) const = 0;
@ -36,4 +37,4 @@ namespace CSMWorld
};
}
#endif // CSM_WOLRD_IDADAPTER_H
#endif // CSM_WOLRD_NESTEDCOLUMNADAPTER_H

@ -5,7 +5,7 @@
#include <stdexcept>
#include "nestedcollection.hpp"
#include "idadapterimp.hpp"
#include "nestedcoladapterimp.hpp"
namespace ESM
{
@ -23,9 +23,9 @@ namespace CSMWorld
template<typename ESXRecordT, typename IdAccessorT = IdAccessor<ESXRecordT> >
class NestedIdCollection : public IdCollection<ESXRecordT, IdAccessorT>, public NestedCollection
{
std::map<const ColumnBase*, NestedIdAdapter<ESXRecordT>* > mAdapters;
std::map<const ColumnBase*, NestedColumnAdapter<ESXRecordT>* > mAdapters;
const NestedIdAdapter<ESXRecordT>& getAdapter(const ColumnBase &column) const;
const NestedColumnAdapter<ESXRecordT>& getAdapter(const ColumnBase &column) const;
public:
@ -51,7 +51,7 @@ namespace CSMWorld
// this method is inherited from NestedCollection, not from Collection<ESXRecordT>
virtual NestableColumn *getNestableColumn(int column);
void addAdapter(std::pair<const ColumnBase*, NestedIdAdapter<ESXRecordT>* > adapter);
void addAdapter(std::pair<const ColumnBase*, NestedColumnAdapter<ESXRecordT>* > adapter);
};
template<typename ESXRecordT, typename IdAccessorT>
@ -61,21 +61,24 @@ namespace CSMWorld
template<typename ESXRecordT, typename IdAccessorT>
NestedIdCollection<ESXRecordT, IdAccessorT>::~NestedIdCollection()
{
for (typename std::map<const ColumnBase *, NestedIdAdapter<ESXRecordT>* >::iterator iter (mAdapters.begin());
iter!=mAdapters.end(); ++iter)
for (typename std::map<const ColumnBase *, NestedColumnAdapter<ESXRecordT>* >::iterator
iter (mAdapters.begin()); iter!=mAdapters.end(); ++iter)
{
delete (*iter).second;
}
}
template<typename ESXRecordT, typename IdAccessorT>
void NestedIdCollection<ESXRecordT, IdAccessorT>::addAdapter(std::pair<const ColumnBase*, NestedIdAdapter<ESXRecordT>* > adapter)
void NestedIdCollection<ESXRecordT, IdAccessorT>::addAdapter(std::pair<const ColumnBase*,
NestedColumnAdapter<ESXRecordT>* > adapter)
{
mAdapters.insert(adapter);
}
template<typename ESXRecordT, typename IdAccessorT>
const NestedIdAdapter<ESXRecordT>& NestedIdCollection<ESXRecordT, IdAccessorT>::getAdapter(const ColumnBase &column) const
const NestedColumnAdapter<ESXRecordT>& NestedIdCollection<ESXRecordT, IdAccessorT>::getAdapter(const ColumnBase &column) const
{
typename std::map<const ColumnBase *, NestedIdAdapter<ESXRecordT>* >::const_iterator iter =
typename std::map<const ColumnBase *, NestedColumnAdapter<ESXRecordT>* >::const_iterator iter =
mAdapters.find (&column);
if (iter==mAdapters.end())

Loading…
Cancel
Save