Jpp  18.3.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JObjectWriter.hh
Go to the documentation of this file.
1 #ifndef __JLANG__JOBJECTWRITER__
2 #define __JLANG__JOBJECTWRITER__
3 
4 #include "JLang/JObjectOutput.hh"
7 
8 
9 /**
10  * \author mdejong
11  */
12 
13 namespace JLANG {}
14 namespace JPP { using namespace JLANG; }
15 
16 namespace JLANG {
17 
18 
19  /**
20  * Auxiliary class for object writing to a named device.
21  *
22  * This class implements the JAbstractObjectWriter interface.
23  */
24  template<class T>
25  struct JObjectWriter :
26  public virtual JObjectOutput<T>,
27  public JAbstractObjectWriter<T>,
28  public JSharedPointer< JObjectOutput<T> >
29  {
30 
32 
33  /**
34  * Default constructor.
35  */
37  {}
38 
39 
40  /**
41  * Get helper.
42  *
43  * \return helper
44  */
45  virtual JObjectOutput<T>* getHelper() const override
46  {
47  return this->get();
48  }
49  };
50 
51 
52  /**
53  * Auxiliary class for object writing with named access.
54  *
55  * This class implements the JAbstractAccessibleObjectWriter interface.
56  */
57  template<class T>
59  public virtual JAccessibleObjectOutput<T>,
61  public JSharedPointer< JAccessibleObjectOutput<T> >
62  {
63 
65 
66  /**
67  * Default constructor.
68  */
70  {}
71 
72 
73  /**
74  * Get helper.
75  *
76  * \return helper
77  */
78  virtual JAccessibleObjectOutput<T>* getHelper() const override
79  {
80  return this->get();
81  }
82  };
83 }
84 
85 #endif
JAccessibleObjectWriter()
Default constructor.
virtual JAccessibleObjectOutput< T > * getHelper() const override
Get helper.
virtual JObjectOutput< T > * getHelper() const override
Get helper.
The template JSharedPointer class can be used to share a pointer to an object.
JSharedPointer< JAccessibleObjectOutput< T > > helper_type
Abstract interface for object writing with named access.
Abstract interface for object writing.
Auxiliary class for object writing to a named device.
Auxiliary class for object writing with named access.
JSharedPointer< JObjectOutput< T > > helper_type
Template interface of object output for single data type.
JObjectWriter()
Default constructor.
Interface for object output with named access.