1 #ifndef CSM_WOLRD_COLLECTIONBASE_H
2 #define CSM_WOLRD_COLLECTIONBASE_H
35 virtual int getSize()
const = 0;
37 virtual std::string
getId (
int index)
const = 0;
39 virtual int getIndex (
const std::string&
id)
const = 0;
45 virtual QVariant
getData (
int index,
int column)
const = 0;
47 virtual void setData (
int index,
int column,
const QVariant& data) = 0;
57 virtual void removeRows (
int index,
int count) = 0;
63 virtual int searchId (
const std::string&
id)
const = 0;
78 const std::string& destination,
89 virtual std::vector<std::string>
getIds (
bool listDeleted =
true)
const = 0;
94 virtual bool reorderRows (
int baseIndex,
const std::vector<int>& newOrder) = 0;
virtual bool reorderRows(int baseIndex, const std::vector< int > &newOrder)=0
virtual std::string getId(int index) const =0
virtual int getColumns() const =0
virtual int searchId(const std::string &id) const =0
virtual void replace(int index, const RecordBase &record)=0
virtual std::vector< std::string > getIds(bool listDeleted=true) const =0
Type
Definition: universalid.hpp:40
CollectionBase()
Definition: collectionbase.cpp:7
virtual QVariant getData(int index, int column) const =0
virtual int getIndex(const std::string &id) const =0
virtual ~CollectionBase()
Definition: collectionbase.cpp:9
virtual void appendRecord(const RecordBase &record, UniversalId::Type type=UniversalId::Type_None)=0
If the record type does not match, an exception is thrown.
int findColumnIndex(Columns::ColumnId id) const
Definition: collectionbase.cpp:22
Definition: columnbase.hpp:15
Base class for record collections.
Definition: collectionbase.hpp:23
virtual int getAppendIndex(const std::string &id, UniversalId::Type type=UniversalId::Type_None) const =0
ColumnId
Definition: columns.hpp:13
virtual const RecordBase & getRecord(const std::string &id) const =0
CollectionBase & operator=(const CollectionBase &)
virtual int getSize() const =0
Definition: universalid.hpp:42
virtual void cloneRecord(const std::string &origin, const std::string &destination, const UniversalId::Type type)=0
virtual void appendBlankRecord(const std::string &id, UniversalId::Type type=UniversalId::Type_None)=0
int searchColumnIndex(Columns::ColumnId id) const
Return index of column with the given id. If no such column exists, -1 is returned.
Definition: collectionbase.cpp:11
virtual void removeRows(int index, int count)=0
< Merge modified into base.
virtual void setData(int index, int column, const QVariant &data)=0
virtual const ColumnBase & getColumn(int column) const =0