Jpp 21.0.0-rc.3
the software that should make you happy
Loading...
Searching...
No Matches
JLANG::JAssignSequence< T >::JCSV Struct Reference

Auxiliary class to assign the remainder of a sequence of Comma Separated Values. More...

#include <JCSV.hh>

Inheritance diagram for JLANG::JAssignSequence< T >::JCSV:
JLANG::JSTDObjectWriter< T > JLANG::JObjectOutput< T > JLANG::JObjectWriter< T > JLANG::JObjectOutput< T > JLANG::JAbstractObjectWriter< T > JLANG::JObjectOutput< T >

Public Types

typedef std::shared_ptr< JObjectOutput< T > > helper_type
 

Public Member Functions

 JCSV (const JSTDObjectWriter< T > &out)
 Constructor.
 
JCSVoperator, (argument_type value)
 Iterator assignment.
 
template<class JOutput_t >
void set (const JOutput_t &out)
 Set output.
 
template<class JOutput_t >
void set (JOutput_t &out)
 Set output.
 
virtual bool put (const T &object) override
 Object output.
 
virtual JObjectOutput< T > * getHelper () const override
 Get helper.
 

Detailed Description

template<class T>
struct JLANG::JAssignSequence< T >::JCSV

Auxiliary class to assign the remainder of a sequence of Comma Separated Values.

Definition at line 51 of file JCSV.hh.

Member Typedef Documentation

◆ helper_type

template<class T >
std::shared_ptr< JObjectOutput<T> > JLANG::JObjectWriter< T >::helper_type
inherited

Definition at line 32 of file JObjectWriter.hh.

Constructor & Destructor Documentation

◆ JCSV()

template<class T >
JLANG::JAssignSequence< T >::JCSV::JCSV ( const JSTDObjectWriter< T > & out)
inline

Constructor.

Parameters
outoutput iterator

Definition at line 59 of file JCSV.hh.

59 :
61 {}
JSTDObjectWriter()
Default constructor.

Member Function Documentation

◆ operator,()

template<class T >
JCSV & JLANG::JAssignSequence< T >::JCSV::operator, ( argument_type value)
inline

Iterator assignment.

Parameters
valuevalue
Returns
value parser

Definition at line 70 of file JCSV.hh.

71 {
72 this->put(value);
73
74 return *this;
75 }
virtual bool put(const T &object)=0
Object output.

◆ set() [1/2]

template<class T >
template<class JOutput_t >
void JLANG::JSTDObjectWriter< T >::set ( const JOutput_t & out)
inlineinherited

Set output.

Parameters
outoutput

Definition at line 66 of file JSTDObjectWriter.hh.

67 {
68 this->reset(getSTDObjectOutput(out));
69 }
JSTDObjectOutput< T > * getSTDObjectOutput(const JSTDObjectOutput< T > &out)
Helper method to create STD compatible object output.
void reset(T &value)
Reset value.

◆ set() [2/2]

template<class T >
template<class JOutput_t >
void JLANG::JSTDObjectWriter< T >::set ( JOutput_t & out)
inlineinherited

Set output.

Parameters
outoutput

Definition at line 78 of file JSTDObjectWriter.hh.

79 {
80 this->reset(getSTDObjectOutput(out));
81 }

◆ put()

template<class T >
virtual bool JLANG::JAbstractObjectWriter< T >::put ( const T & object)
inlineoverridevirtualinherited

Object output.

Parameters
objectobject
Returns
true if OK; else false

Implements JLANG::JObjectOutput< T >.

Definition at line 43 of file JAbstractObjectWriter.hh.

44 {
45 return (this->getHelper() != NULL && this->getHelper()->put(object));
46 }
virtual JObjectOutput< T > * getHelper() const =0
Get helper.
virtual bool put(const T &object) override
Object output.

◆ getHelper()

template<class T >
virtual JObjectOutput< T > * JLANG::JObjectWriter< T >::getHelper ( ) const
inlineoverridevirtualinherited

Get helper.

Returns
helper

Implements JLANG::JAbstractObjectWriter< T >.

Definition at line 46 of file JObjectWriter.hh.

47 {
48 return this->get();
49 }

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