UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
polarity_ldb.hpp
1 /* polarity_ldb.hpp */
2 /* $Id: polarity_ldb.hpp 21022 2011-07-11 11:45:03Z urij $ */
3 #ifndef __polarity_ldb_hpp
4 #define __polarity_ldb_hpp
5 
6 #include <string>
7 
8 #include <ldb/dbtools.h>
9 #include <s2proc/polarity.hpp>
10 
13 {
14 public:
15 
17  PolarityLDB(const dbItem &db_item,
18  const std::string table_name = std::string(),
19  bool is_rewrite = true);
20 
22  ~PolarityLDB();
23 
24 
27  bool load(PolarityVec &pol_vec);
28 
31  bool save(const PolarityVec &pol_vec, int *saved_db_line = 0x0);
32 
33 
34  void setDbItem(const dbItem &db_item) {m_db_item = db_item;}
35 
36  const dbItem& getDbItem() const {return m_db_item;}
37 
38  void setTableName(const std::string &table_name)
39  {m_table_name = table_name;}
40 
41  const std::string& getTableName() const
42  {return m_table_name;}
43 
44  void setRewriteFlag(bool rewrite) {m_b_rewrite = rewrite;}
45 
46  bool getRewriteFlag() const {return m_b_rewrite;}
47 
48 protected:
49 
52 
54  std::string m_table_name;
55 
58 };
59 
60 #endif /* polarity_ldb.hpp */
Definition: polarity_ldb.hpp:12
PolarityLDB(const dbItem &db_item, const std::string table_name=std::string(), bool is_rewrite=true)
bool m_b_rewrite
Definition: polarity_ldb.hpp:57
std::string m_table_name
Definition: polarity_ldb.hpp:54
bool save(const PolarityVec &pol_vec, int *saved_db_line=0x0)
bool load(PolarityVec &pol_vec)
Definition: dbnamedefs.h:85
dbItem m_db_item
Definition: polarity_ldb.hpp:51