Jpp  18.2.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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
virtual JRewindableObjectIterator< T > * getHelper() const override
Get helper.
JObjectIterator< T >::pointer_type pointer_type
Interface for object iteration with rewinding.
JSharedPointer< JRewindableObjectIterator< T > > helper_type
virtual JAccessibleObjectIterator< T > * getHelper() const override
Get helper.
JSharedPointer< JObjectIterator< T > > helper_type
JObjectIterator< T >::pointer_type pointer_type
Interface of object iteration for a single data type.
virtual JObjectIterator< T > * getHelper() const override
Get helper.
JRewindableObjectReader()
Default constructor.
JSharedPointer< JAccessibleObjectIterator< T > > helper_type
The template JSharedPointer class can be used to share a pointer to an object.
Auxiliary class for object reading with rewinding.
Auxiliary class for object reading.
Abstract interface for object reading.
JObjectReader()
Default constructor.
Interface for object iteration with named access.
Auxiliary class for object reading with named access.
JObjectIterator< T >::pointer_type pointer_type
Abstract interface for object reading with rewinding.
JAccessibleObjectReader()
Default constructor.
Abstract interface for object reading with named access.