3 #ifndef __table_doc_hpp
4 #define __table_doc_hpp
60 Item(
const bool ro_flag =
false):
64 Item(
const T &val,
const bool ro_flag=
false):
68 const T&
value()
const {
return m_val;}
89 const std::string &caption_str = std::string()):
91 m_caption(caption_str) {}
100 const std::string&
caption()
const {
return m_caption;}
103 void setCaption(
const std::string &caption_str) {m_caption = caption_str;}
111 std::string m_caption;
126 virtual size_t rowsNum()
const = 0;
129 virtual size_t colsNum()
const = 0;
133 virtual const HdrItem&
hdrItem(
const size_t col)
const = 0;
139 virtual const AbstractItem&
item(
const size_t row,
const size_t col)
const = 0;
143 virtual bool setItem(
const size_t row,
const size_t col,
const AbstractItem &
item) = 0;
150 virtual bool insertRow(
const size_t cur_row) = 0;
155 virtual bool removeRow(
const size_t row) = 0;
172 const std::string&
name()
const;
virtual const AbstractItem & item(const size_t row, const size_t col) const =0
virtual bool canRemoveRow(const size_t) const
Definition: table_doc.hpp:169
Item(const T &val, const bool ro_flag=false)
Definition: table_doc.hpp:64
TableDoc(const std::string &name=std::string())
virtual ~AbstractItem()
Definition: table_doc.hpp:36
AbstractItem(const bool ro_flag=false)
Definition: table_doc.hpp:32
Definition: table_doc.hpp:12
Definition: table_doc.hpp:19
bool readOnly() const
Definition: table_doc.hpp:42
virtual const HdrItem & hdrItem(const size_t col) const =0
void setType(const ItemType items_type)
Definition: table_doc.hpp:97
virtual bool setItem(const size_t row, const size_t col, const AbstractItem &item)=0
virtual ItemType type() const
Definition: table_doc.hpp:39
virtual bool insertRow(const size_t cur_row)=0
virtual size_t rowsNum() const =0
Definition: table_doc.hpp:27
Item(const bool ro_flag=false)
Definition: table_doc.hpp:60
void setReadOnly(const bool ro_flag)
Definition: table_doc.hpp:45
const T & value() const
Definition: table_doc.hpp:68
ItemType m_items_type
Definition: table_doc.hpp:108
const std::string & name() const
virtual bool removeRow(const size_t row)=0
virtual ItemType type() const
Definition: table_doc.hpp:74
Definition: table_doc.hpp:23
ItemType type() const
Definition: table_doc.hpp:94
Definition: table_doc.hpp:55
HdrItem(const ItemType items_type, const std::string &caption_str=std::string())
Definition: table_doc.hpp:88
virtual bool canInsertRow(const size_t) const
Definition: table_doc.hpp:164
void setCaption(const std::string &caption_str)
Definition: table_doc.hpp:103
Definition: table_doc.hpp:83
Definition: table_doc.hpp:20
Definition: table_doc.hpp:22
Definition: table_doc.hpp:21
virtual ~TableDoc()
Definition: table_doc.hpp:119
virtual size_t colsNum() const =0
const std::string & caption() const
Definition: table_doc.hpp:100
void setValue(const T &val)
Definition: table_doc.hpp:71
ItemType
Definition: table_doc.hpp:17