Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
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.
 
virtual bool put (const T &object) override
 Object output.
 

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

◆ JWriterObjectOutput()

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

◆ put() [1/3]

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 }
virtual bool put(const T &object) override
Object output.
Auxiliary template class for type bool.
Definition JBool.hh:21
Template class test for polymorphism.

◆ put() [2/3]

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); }

◆ put() [3/3]

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

◆ out

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: