moved getColumnId function from IdTable to IdTable base and made it virtual

search
Marc Zinnschlag 10 years ago
parent a8cdd30124
commit 416b8165cd

@ -82,7 +82,7 @@ namespace CSMWorld
/// Is \a id flagged as deleted?
virtual bool isDeleted (const std::string& id) const;
int getColumnId(int column) const;
virtual int getColumnId(int column) const;
};
}

@ -60,6 +60,8 @@ namespace CSMWorld
/// Is \a id flagged as deleted?
virtual bool isDeleted (const std::string& id) const = 0;
virtual int getColumnId (int column) const = 0;
unsigned int getFeatures() const;
};
}

@ -144,3 +144,14 @@ bool CSMWorld::ResourceTable::isDeleted (const std::string& id) const
{
return false;
}
int CSMWorld::ResourceTable::getColumnId (int column) const
{
switch (column)
{
case 0: return Columns::ColumnId_Id;
case 1: return Columns::ColumnId_RecordType;
}
return -1;
}

@ -51,6 +51,8 @@ namespace CSMWorld
/// Is \a id flagged as deleted?
virtual bool isDeleted (const std::string& id) const;
virtual int getColumnId (int column) const;
};
}

Loading…
Cancel
Save