Jpp 19.3.0-rc.3
the software that should make you happy
Loading...
Searching...
No Matches
JLANG::JValue< T > Class Template Reference

Wrapper class around template object. More...

#include <JValue.hh>

Inheritance diagram for JLANG::JValue< T >:
JLANG::JValueInput< T > JLANG::JValueOutput< T > JLANG::JStreamInput JLANG::JStreamOutput

Public Member Functions

 JValue (T &object)
 Constructor.
 
 JValue (void *ps)
 Constructor.
 
 operator const T & () const
 type conversion operator
 
 operator T& ()
 type conversion operator
 
virtual std::istream & read (std::istream &in) override
 Stream input.
 
 operator const T & () const
 type conversion operator
 
virtual std::ostream & write (std::ostream &out) const override
 Stream output.
 

Protected Attributes

T * p
 
const T * p
 

Detailed Description

template<class T>
class JLANG::JValue< T >

Wrapper class around template object.

This class implements the JStreamInput and JStreamOutput interfaces.

Definition at line 151 of file JValue.hh.

Constructor & Destructor Documentation

◆ JValue() [1/2]

template<class T >
JLANG::JValue< T >::JValue ( T & object)
inline

Constructor.

Parameters
objectinput object

Definition at line 161 of file JValue.hh.

161 :
162 JValueInput <T>(&object),
163 JValueOutput<T>(&object)
164 {}
friend class JValueOutput< T >
Definition JValue.hh:42
JValueInput(T &object)
Constructor.
Definition JValue.hh:50

◆ JValue() [2/2]

template<class T >
JLANG::JValue< T >::JValue ( void * ps)
inline

Constructor.

Parameters
pspointer to valid object

Definition at line 172 of file JValue.hh.

172 :
173 JValueInput <T>(ps) ,
175 {}

Member Function Documentation

◆ operator const T &() [1/2]

template<class T >
JLANG::JValueInput< T >::operator const T & ( ) const
inlineinherited

type conversion operator

Definition at line 65 of file JValue.hh.

◆ operator T&()

template<class T >
JLANG::JValueInput< T >::operator T& ( )
inlineinherited

type conversion operator

Definition at line 66 of file JValue.hh.

◆ read()

template<class T >
virtual std::istream & JLANG::JValueInput< T >::read ( std::istream & in)
inlineoverridevirtualinherited

Stream input.

Parameters
ininput stream
Returns
input stream

Implements JLANG::JStreamInput.

Definition at line 75 of file JValue.hh.

76 {
77 return in >> *p;
78 }

◆ operator const T &() [2/2]

template<class T >
JLANG::JValueOutput< T >::operator const T & ( ) const
inlineinherited

type conversion operator

Definition at line 126 of file JValue.hh.

◆ write()

template<class T >
virtual std::ostream & JLANG::JValueOutput< T >::write ( std::ostream & out) const
inlineoverridevirtualinherited

Stream output.

Parameters
outoutput stream
Returns
output stream

Implements JLANG::JStreamOutput.

Definition at line 135 of file JValue.hh.

136 {
137 return out << *p;
138 }

Member Data Documentation

◆ p [1/2]

template<class T >
T* JLANG::JValueInput< T >::p
protectedinherited

Definition at line 82 of file JValue.hh.

◆ p [2/2]

template<class T >
const T* JLANG::JValueOutput< T >::p
protectedinherited

Definition at line 142 of file JValue.hh.


The documentation for this class was generated from the following file: