Jpp  master_rocky-40-g5f0272dcd
the software that should make you happy
JObjectReader.hh
Go to the documentation of this file.
1 #ifndef __JLANG__JOBJECTREADER__
2 #define __JLANG__JOBJECTREADER__
3 
6 
7 
8 /**
9  * \author mdejong
10  */
11 
12 namespace JLANG {}
13 namespace JPP { using namespace JLANG; }
14 
15 namespace JLANG {
16 
17  /**
18  * Auxiliary class for object reading.
19  *
20  * This class implements the JAbstractObjectReader interface.
21  */
22  template<class T>
23  struct JObjectReader :
24  public virtual JObjectIterator<T>,
25  public JAbstractObjectReader<T>,
26  public JSharedPointer< JObjectIterator<T> >
27  {
28 
31 
32  /**
33  * Default constructor.
34  */
36  {}
37 
38 
39  /**
40  * Get helper.
41  *
42  * \return helper
43  */
44  virtual JObjectIterator<T>* getHelper() const override
45  {
46  return this->get();
47  }
48  };
49 
50 
51  /**
52  * Auxiliary class for object reading with rewinding.
53  *
54  * This class implements the JAbstractRewindableObjectReader interface.
55  */
56  template<class T>
58  public virtual JRewindableObjectIterator<T>,
60  public JSharedPointer< JRewindableObjectIterator<T> >
61  {
62 
65 
66  /**
67  * Default constructor.
68  */
70  {}
71 
72 
73  /**
74  * Get helper.
75  *
76  * \return helper
77  */
78  virtual JRewindableObjectIterator<T>* getHelper() const override
79  {
80  return this->get();
81  }
82  };
83 
84 
85  /**
86  * Auxiliary class for object reading with named access.
87  *
88  * This class implements the JAbstractAccessibleObjectReader interface.
89  */
90  template<class T>
92  public virtual JAccessibleObjectIterator<T>,
94  public JSharedPointer< JAccessibleObjectIterator<T> >
95  {
96 
99 
100  /**
101  * Default constructor.
102  */
104  {}
105 
106 
107  /**
108  * Get helper.
109  *
110  * \return helper
111  */
112  virtual JAccessibleObjectIterator<T>* getHelper() const override
113  {
114  return this->get();
115  }
116  };
117 }
118 
119 #endif
Interface for object iteration with named access.
Interface of object iteration for a single data type.
virtual JClass_t * get() const override
Get pointer.
Definition: JPointer.hh:64
Interface for object iteration with rewinding.
The template JSharedPointer class can be used to share a pointer to an object.
Auxiliary classes and methods for language specific functionality.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Abstract interface for object reading with named access.
Abstract interface for object reading.
Abstract interface for object reading with rewinding.
Auxiliary class for object reading with named access.
virtual JAccessibleObjectIterator< T > * getHelper() const override
Get helper.
JObjectIterator< T >::pointer_type pointer_type
JSharedPointer< JAccessibleObjectIterator< T > > helper_type
JAccessibleObjectReader()
Default constructor.
Auxiliary class for object reading.
JObjectReader()
Default constructor.
JSharedPointer< JObjectIterator< T > > helper_type
JObjectIterator< T >::pointer_type pointer_type
virtual JObjectIterator< T > * getHelper() const override
Get helper.
Auxiliary class for object reading with rewinding.
JObjectIterator< T >::pointer_type pointer_type
JRewindableObjectReader()
Default constructor.
JSharedPointer< JRewindableObjectIterator< T > > helper_type
virtual JRewindableObjectIterator< T > * getHelper() const override
Get helper.