UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
object.hpp
1 /* db_object.hpp */
2 /* $Id$ */
3 #ifndef __hds_db_object_hpp
4 #define __hds_db_object_hpp
5 
6 #include <string>
7 #include <vector>
8 #include <ctime>
9 #include <hds_db/base/defines.hpp>
10 
12 namespace hds
13 {
15  namespace db
16  {
18  class Object
19  {
20  public:
21 
23  typedef std::vector<std::string> Names;
24 
25 
27  Object();
28 
30  virtual ~Object();
31 
32 
33  //------------------------------------------------------------------------------------------
34 
37  virtual ErrCode open(const std::string &name, OpenMode mode) = 0;
38 
40  virtual OpenMode openMode() const;
41 
44  virtual ErrCode close() = 0;
45 
48  virtual ErrCode flush() = 0;
49 
50 
51  //------------------------------------------------------------------------------------------
52 
55  virtual std::string name(ErrCode *rc = NULL) const = 0;
56 
59  virtual ErrCode setName(const std::string &name_str) = 0;
60 
61  //------------------------------------------------------------------------------------------
62 
65  virtual ErrCode remove(const std::string &name) = 0;
66 
69  virtual ErrCode getList(Names &list) const = 0;
70 
75  virtual bool exists(const std::string &name,
76  ErrCode *rc = NULL) const;
77 
82  virtual size_t dataSize(const std::string &name,
83  ErrCode *rc = NULL) const = 0;
84 
87  virtual time_t creationTime(const std::string &name,
88  ErrCode *rc = NULL) const = 0;
89 
92  virtual time_t modificationTime(const std::string &name,
93  ErrCode *rc = NULL) const = 0;
94 
95  protected:
96 
99  };
100  }; // db
101 }; // hds
102 
103 #endif /* hds_db_object_hpp */
virtual ~Object()
virtual std::string name(ErrCode *rc=NULL) const =0
virtual OpenMode openMode() const
OpenMode
Definition: defines.hpp:32
virtual ErrCode open(const std::string &name, OpenMode mode)=0
virtual time_t creationTime(const std::string &name, ErrCode *rc=NULL) const =0
virtual bool exists(const std::string &name, ErrCode *rc=NULL) const
virtual size_t dataSize(const std::string &name, ErrCode *rc=NULL) const =0
ErrCode
Definition: defines.hpp:46
virtual ErrCode getList(Names &list) const =0
virtual time_t modificationTime(const std::string &name, ErrCode *rc=NULL) const =0
OpenMode m_cur_open_mode
Definition: object.hpp:98
virtual ErrCode flush()=0
virtual ErrCode close()=0
Definition: object.hpp:18
virtual ErrCode setName(const std::string &name_str)=0
std::vector< std::string > Names
Definition: object.hpp:23