CompleteDB Embedded: Direct C++ API  2.4.2
TableIterator.hpp
Go to the documentation of this file.
1 #ifndef COMPLETEDB_TABLEITERATOR_HPP
2 #define COMPLETEDB_TABLEITERATOR_HPP
3 
4 #include "CompleteDb.h"
6 #include "completedb/Object.hpp"
9 
10 namespace completedb {
11 
18 : public virtual Object
19 , public Iterator
20 , public TableInfo
21 {
22 
23  friend class Database;
24  friend class DatabaseInfo;
25 
26 public: // override Object iface
27 
31  virtual bool cast(const Object& from) { return completedb_TableIterator_cast(&m, from.get(), from.getClassType()); }
35  virtual bool isConnected() const { return completedb_TableIterator_isConnected(m); }
39  virtual bool isDisconnected() const { return completedb_TableIterator_isDisconnected(m); }
48 
49 public: // override Iterator iface
50 
54  virtual bool next() { return completedb_TableIterator_next(m); }
58  virtual void reset() { completedb_TableIterator_reset(m); }
59 
60 public: // override EntityInfo iface
61 
65  virtual const char* getDescription() const { return completedb_TableIterator_getDescription(m); }
66 
67 public: // override IdentityInfo iface
68 
72  virtual const char* getName() const { return completedb_TableIterator_getName(m); }
73 
74 public: // override TableInfo iface
75 
79  virtual bool containsColumn(const char* name) { return completedb_TableIterator_containsColumn(m, name); }
83  virtual bool containsColumn(const IdentityInfo& name) { return completedb_TableIterator_containsColumn(m, name.getName()); }
87  virtual bool exists() { return completedb_TableIterator_exists(m); }
92 
93 public: // factory lvalue
94 
97 
98 public: // factory
99 
102 
103 private: // factory
104 
105  TableIterator(void* src) : Object(src) {}
106 
107 };
108 
109 } // namespace
110 
111 #endif /* COMPLETEDB_TABLEITERATOR_HPP */