CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
dummy_helpers.h
Go to the documentation of this file.
1 #ifndef Subsystem_Package_dummy_helpers_h
2 #define Subsystem_Package_dummy_helpers_h
3 // -*- C++ -*-
4 //
5 // Package: Subsystem/Package
6 // Class : dummy_helpers
7 //
16 //
17 // Original Author: Chris Jones
18 // Created: Sat, 03 Aug 2013 21:42:38 GMT
19 //
20 
21 // system include files
22 
23 // user include files
24 
25 // forward declarations
26 
27 namespace edm {
28  namespace stream {
29  namespace impl {
30  struct dummy_ptr {
31  void * get() { return nullptr;}
32  void reset(void*) {}
33  void * release() { return nullptr;}
34  };
35 
36  struct dummy_vec {
37  void resize(size_t) {}
38  dummy_ptr operator[](unsigned int) { return dummy_ptr();}
39  };
40  template<typename T>
42  typedef std::unique_ptr<T> type;
43  };
44  template<>
45  struct choose_unique_ptr<void> {
46  typedef dummy_ptr type;
47  };
48 
49  template<>
50  struct choose_unique_ptr<void const> {
51  typedef dummy_ptr type;
52  };
53 
54  template<typename T>
56  typedef std::vector<std::shared_ptr<T>> type;
57  };
58  template<>
59  struct choose_shared_vec<void> {
60  typedef dummy_vec type;
61  };
62  template<>
63  struct choose_shared_vec<void const> {
64  typedef dummy_vec type;
65  };
66  }
67  }
68 }
69 
70 
71 #endif
dummy_ptr operator[](unsigned int)
Definition: dummy_helpers.h:38
string const
Definition: compareJSON.py:14
std::vector< std::shared_ptr< T > > type
Definition: dummy_helpers.h:56