Something went wrong. Try again.
OpenMW is an open implementation of the Morrowind engine
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243#include "nestedcollection.hpp"
#include <apps/opencs/model/world/columns.hpp>
#include <stdexcept>
#include "columnbase.hpp"
int CSMWorld::NestedCollection::getNestedRowsCount(int row, int column) const{ return 0;}
int CSMWorld::NestedCollection::getNestedColumnsCount(int row, int column) const{ return 0;}
int CSMWorld::NestedCollection::searchNestedColumnIndex(int parentColumn, Columns::ColumnId id){ // Assumed that the parentColumn is always a valid index const NestableColumn* parent = getNestableColumn(parentColumn); int nestedColumnCount = getNestedColumnsCount(0, parentColumn); for (int i = 0; i < nestedColumnCount; ++i) { if (parent->nestedColumn(i).mColumnId == id) { return i; } } return -1;}
int CSMWorld::NestedCollection::findNestedColumnIndex(int parentColumn, Columns::ColumnId id){ int index = searchNestedColumnIndex(parentColumn, id); if (index == -1) { throw std::logic_error("CSMWorld::NestedCollection: No such nested column"); } return index;}