CompleteDB Embedded: Direct C++ API  2.4.2
TableInfo.hpp
Go to the documentation of this file.
1 #ifndef COMPLETEDB_TABLEINFO_HPP
2 #define COMPLETEDB_TABLEINFO_HPP
3 
4 #include "CompleteDb.h"
6 #include "completedb/Object.hpp"
10 
11 namespace completedb {
12 
18 class TableInfo
19 : public virtual Object
20 , public EntityInfo
21 {
22 
23 public: // override Object iface
24 
28  virtual bool cast(const Object& from) { return completedb_TableInfo_cast(&m, from.get(), from.getClassType()); }
32  virtual bool isConnected() const { return completedb_TableInfo_isConnected(m); }
36  virtual bool isDisconnected() const { return completedb_TableInfo_isDisconnected(m); }
45 
46 public: // override EntityInfo iface
47 
51  virtual const char* getDescription() const { return completedb_TableInfo_getDescription(m); }
52 
53 public: // override IdentityInfo iface
54 
58  virtual const char* getName() const { return completedb_TableInfo_getName(m); }
59 
60 public: // iface
61 
65  virtual bool containsColumn(const char* name) { return completedb_TableInfo_containsColumn(m, name); }
69  virtual bool containsColumn(const IdentityInfo& name) { return completedb_TableInfo_containsColumn(m, name.getName()); }
73  virtual bool exists() { return completedb_TableInfo_exists(m); }
78 
79 public: // factory lvalue
80 
81  TableInfo& operator=(const TableInfo& src) { completedb_TableInfo_assign(&m, src.m, src.getClassType()); return *this; }
83 
84 public: // factory
85 
88 
89 private: // factory
90 
91  TableInfo(void* src) : Object(src) {}
92 
93 };
94 
95 } // namespace
96 
97 #endif /* COMPLETEDB_TABLEINFO_HPP */