ANNA Suite  2020b
Multipurpose development suite for Telco applications
OutputBind.hpp
Go to the documentation of this file.
1 // ANNA - Anna is Not Nothingness Anymore //
2 // //
3 // (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo //
4 // //
5 // See project site at http://redmine.teslayout.com/projects/anna-suite //
6 // See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE //
7 
8 
9 #ifndef anna_dbms_oracle_OutputBind_hpp
10 #define anna_dbms_oracle_OutputBind_hpp
11 
12 #include <anna/dbms/OutputBind.hpp>
13 
15 
16 struct OCIDefine;
17 
18 namespace anna {
19 
20 namespace dbms {
21 
22 class Statement;
23 
24 namespace oracle {
25 
26 class OutputBind : public dbms::OutputBind, public BaseBind {
27 public:
28  OutputBind(const char* name, dbms::Data& data);
29  ~OutputBind();
30 
31 private:
32  OCIDefine* a_ociDefine;
33 
34  void decode() const noexcept(false);
35  void prepare(dbms::Statement*, dbms::Connection*, const int pos) noexcept(false);
36  void release(dbms::Statement*) { a_ociDefine = NULL; }
37 
38  void decodeFloat(dbms::Data&) const noexcept(false);
39  void decodeShortBlock(dbms::Data&) const noexcept(false);
40  void decodeLongBlock(dbms::Data&) const noexcept(false);
41  void decodeDate(dbms::Data&) const noexcept(false);
42 
43  void do_write(const dbms::LongBlock&) const noexcept(false);
44 
45  static unsigned char asByte(const char hex)
46  {
47  return (hex >= '0' && hex <= '9') ? (hex - '0') : ((hex - 'A') + 0x0a);
48  }
49 
50  friend class Statement;
51 };
52 
53 }
54 }
55 }
56 
57 #endif
58 
Definition: Connection.hpp:38
Definition: Statement.hpp:35
Definition: LongBlock.hpp:33
Definition: Statement.hpp:43
Definition: OutputBind.hpp:26
Definition: Data.hpp:27
Definition: OutputBind.hpp:26
OutputBind(const char *name, dbms::Data &data)
Definition: app.hpp:12
Definition: BaseBind.hpp:36