CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Binary.h
Go to the documentation of this file.
1 #ifndef CondCore_CondDB_Binary_h
2 #define CondCore_CondDB_Binary_h
3 
4 // for the old system, this will go away
6 #include <string>
7 #include <memory>
8 // temporarely
9 #include <boost/shared_ptr.hpp>
10 //
11 
12 namespace coral {
13  class Blob;
14 }
15 
16 namespace cond {
17 
18  class Binary {
19  public:
20  Binary();
21 
22  template <typename T> explicit Binary( const T& object );
23 
24  Binary( const void* data, size_t size );
25 
26  explicit Binary( const coral::Blob& data );
27 
28  Binary( const Binary& rhs );
29 
30  Binary& operator=( const Binary& rhs );
31 
32  const coral::Blob& get() const;
33 
34  void copy( const std::string& source );
35 
36  const void* data() const;
37 
38  void* data();
39 
40  size_t size() const;
41 
42  ora::Object oraObject() const;
43 
44  void fromOraObject( const ora::Object& object );
45 
46  private:
47  std::shared_ptr<coral::Blob> m_data;
48  //
49  // workaround to support the non-streamed, packed objects ( the old system )
51  };
52 
53  template <typename T> Binary::Binary( const T& object ):
54  m_object( object ){
55  }
56 }
57 
58 #endif
59 
ora::Object m_object
Definition: Binary.h:50
void fromOraObject(const ora::Object &object)
Definition: Binary.cc:66
size_t size() const
Definition: Binary.cc:57
std::shared_ptr< coral::Blob > m_data
Definition: Binary.h:47
Binary & operator=(const Binary &rhs)
Definition: Binary.cc:30
void copy(const std::string &source)
Definition: Binary.cc:42
ora::Object oraObject() const
Definition: Binary.cc:62
const void * data() const
Definition: Binary.cc:48
long double T
static std::string const source
Definition: EdmProvDump.cc:42