Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
JROOT::JRootStreamObjectOutput< T > Class Template Reference

Template implementation of stream output for single data type based on ROOT dictionary. More...

#include <JRootStreamObjectOutput.hh>

Inheritance diagram for JROOT::JRootStreamObjectOutput< T >:
JLANG::JObjectOutput< T >

Public Member Functions

 JRootStreamObjectOutput (JRootWriter &out, const std::string &sep="")
 Constructor.
 
virtual bool put (const T &object) override
 Object output.
 
const std::string & getSeparator () const
 Get token separator.
 
void setSeparator (const std::string &sep)
 Set token separator.
 

Private Attributes

JRootWriter__out
 
std::string __sep
 

Detailed Description

template<class T>
class JROOT::JRootStreamObjectOutput< T >

Template implementation of stream output for single data type based on ROOT dictionary.

This class implements the JLANG::JObjectOutput interface.

Definition at line 33 of file JRootStreamObjectOutput.hh.

Constructor & Destructor Documentation

◆ JRootStreamObjectOutput()

template<class T >
JROOT::JRootStreamObjectOutput< T >::JRootStreamObjectOutput ( JRootWriter & out,
const std::string & sep = "" )
inline

Constructor.

Parameters
outoutput stream
septoken separator

Definition at line 43 of file JRootStreamObjectOutput.hh.

Member Function Documentation

◆ put()

template<class T >
virtual bool JROOT::JRootStreamObjectOutput< T >::put ( const T & object)
inlineoverridevirtual

Object output.

Parameters
objectobject
Returns
true if OK; else false

Implements JLANG::JObjectOutput< T >.

Definition at line 56 of file JRootStreamObjectOutput.hh.

57 {
58 __out.putObject(object) << __sep;
59
60 return (bool) __out;
61 }
JRootWriter & putObject(const T &object)
Write object.

◆ getSeparator()

template<class T >
const std::string & JROOT::JRootStreamObjectOutput< T >::getSeparator ( ) const
inline

Get token separator.

Returns
separator

Definition at line 69 of file JRootStreamObjectOutput.hh.

70 {
71 return this->__sep;
72 }

◆ setSeparator()

template<class T >
void JROOT::JRootStreamObjectOutput< T >::setSeparator ( const std::string & sep)
inline

Set token separator.

Parameters
sepseparator

Definition at line 80 of file JRootStreamObjectOutput.hh.

81 {
82 this->__sep = sep;
83 }

Member Data Documentation

◆ __out

template<class T >
JRootWriter& JROOT::JRootStreamObjectOutput< T >::__out
private

Definition at line 86 of file JRootStreamObjectOutput.hh.

◆ __sep

template<class T >
std::string JROOT::JRootStreamObjectOutput< T >::__sep
private

Definition at line 87 of file JRootStreamObjectOutput.hh.


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