Jpp  18.1.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
JIO::JWriterObjectOutput< T > Class Template Reference

Implementation of object output using JIO::JWriter for single data type. More...

#include <JWriterObjectOutput.hh>

Inheritance diagram for JIO::JWriterObjectOutput< T >:
JLANG::JObjectOutput< T > JIO::JBinaryWriterObjectOutput< T, true > JSUPPORT::JDAQWriterObjectOutput< T, true >

Public Member Functions

 JWriterObjectOutput (JWriter &writer)
 Constructor. More...
 
virtual bool put (const T &object) override
 Object output. More...
 

Private Member Functions

bool put (const T &object, JLANG::JBool< true >)
 
bool put (const T &object, JLANG::JBool< false >)
 

Private Attributes

JWriterout
 

Detailed Description

template<class T>
class JIO::JWriterObjectOutput< T >

Implementation of object output using JIO::JWriter for single data type.

This class implements the JLANG::JObjectOutput interface.

Definition at line 32 of file JWriterObjectOutput.hh.

Constructor & Destructor Documentation

template<class T>
JIO::JWriterObjectOutput< T >::JWriterObjectOutput ( JWriter writer)
inline

Constructor.

Parameters
writerwriter output

Definition at line 41 of file JWriterObjectOutput.hh.

41  :
42  out(writer)
43  {}

Member Function Documentation

template<class T>
virtual bool JIO::JWriterObjectOutput< T >::put ( const T object)
inlineoverridevirtual

Object output.

Parameters
objectobject
Returns
true if OK; else false

Implements JLANG::JObjectOutput< T >.

Definition at line 52 of file JWriterObjectOutput.hh.

53  {
55  }
Auxiliary template class for type bool.
Definition: JBool.hh:20
Template class test for polymorphism.
Definition: JConversion.hh:22
virtual bool put(const T &object) override
Object output.
template<class T>
bool JIO::JWriterObjectOutput< T >::put ( const T object,
JLANG::JBool< true >   
)
inlineprivate

Definition at line 58 of file JWriterObjectOutput.hh.

58 { return (bool) object.write(out); }
template<class T>
bool JIO::JWriterObjectOutput< T >::put ( const T object,
JLANG::JBool< false >   
)
inlineprivate

Definition at line 59 of file JWriterObjectOutput.hh.

59 { return (bool) (out << object); }

Member Data Documentation

template<class T>
JWriter& JIO::JWriterObjectOutput< T >::out
private

Definition at line 61 of file JWriterObjectOutput.hh.


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