Jpp  19.0.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Attributes | List of all members
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. More...
 
virtual bool put (const T &object) override
 Object output. More...
 
const std::string & getSeparator () const
 Get token separator. More...
 
void setSeparator (const std::string &sep)
 Set token separator. More...
 

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

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.

44  :
45  __out(out),
46  __sep(sep)
47  {}

Member Function Documentation

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.
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  }
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

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

Definition at line 86 of file JRootStreamObjectOutput.hh.

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: