CompleteDB Embedded: Direct C++ API  2.4.2
LastError.hpp
Go to the documentation of this file.
1 #ifndef COMPLETEDB_LASTERROR_HPP
2 #define COMPLETEDB_LASTERROR_HPP
3 
4 #include "CompleteDb.h"
6 #include "completedb/Object.hpp"
7 
8 namespace completedb {
9 
15 class LastError
16 : public virtual Object
17 {
18 
19 public: // override Object iface
20 
24  virtual bool cast(const Object& from) { return completedb_LastError_cast(&m, from.get(), from.getClassType()); }
28  virtual bool isConnected() const { return completedb_LastError_isConnected(m); }
32  virtual bool isDisconnected() const { return completedb_LastError_isDisconnected(m); }
41 
42 public: // iface
43 
51  virtual const char* getLastError() const { return completedb_LastError_getLastError(m); }
52 
53 public: // factory lvalue
54 
55  LastError& operator=(const LastError& src) { completedb_LastError_assign(&m, src.m, src.getClassType()); return *this; }
57 
58 public: // factory
59 
62 
63 private: // factory
64 
65  LastError(void* src) : Object(src) {}
66 
67 };
68 
69 } // namespace
70 
71 #endif /* COMPLETEDB_LASTERROR_HPP */