Jpp test-rotations-new
the software that should make you happy
Loading...
Searching...
No Matches
JEEP::JPropertiesTemplateElement< JProperties > Class Reference

Template specialisation for JProperties. More...

#include <JProperties.hh>

Inheritance diagram for JEEP::JPropertiesTemplateElement< JProperties >:
JEEP::JPropertiesElementInterface JLANG::JStreamInput JLANG::JStreamOutput JLANG::JStreamSuffixOutput

Public Member Functions

 JPropertiesTemplateElement (const JProperties &value)
 Constructor.
 
virtual std::istream & read (std::istream &in) override
 Stream input.
 
virtual std::ostream & write (std::ostream &out, const char *prefix, const char postfix) const override
 Stream output.
 
virtual std::ostream & write (std::ostream &out) const override
 Stream output.
 
virtual bool is_properties () const override
 Get properties type.
 
virtual bool equals (const JPropertiesElementInterface &element) const
 Equality between property element interfaces.
 

Private Attributes

JProperties object
 

Detailed Description

Template specialisation for JProperties.

Definition at line 1007 of file JProperties.hh.

Constructor & Destructor Documentation

◆ JPropertiesTemplateElement()

JEEP::JPropertiesTemplateElement< JProperties >::JPropertiesTemplateElement ( const JProperties & value)
inline

Constructor.

Parameters
valuereference of template bject

Definition at line 1016 of file JProperties.hh.

1016 :
1017 JPropertiesElementInterface(),
1018 object(value)
1019 {}

Member Function Documentation

◆ read()

virtual std::istream & JEEP::JPropertiesTemplateElement< JProperties >::read ( std::istream & in)
inlineoverridevirtual

Stream input.

Parameters
ininput stream
Returns
input stream

Implements JLANG::JStreamInput.

Definition at line 1028 of file JProperties.hh.

1029 {
1030 object.read(in);
1031
1032 return in;
1033 }

◆ write() [1/2]

virtual std::ostream & JEEP::JPropertiesTemplateElement< JProperties >::write ( std::ostream & out,
const char * prefix,
const char postfix ) const
inlineoverridevirtual

Stream output.

Parameters
outoutput stream
prefixprefix
postfixpostfix
Returns
output stream

Reimplemented from JEEP::JPropertiesElementInterface.

Definition at line 1044 of file JProperties.hh.

1047 {
1048 using namespace std;
1049
1050 for (JProperties::const_iterator i = object.begin(); i != object.end(); ++i) {
1051
1052 char c = ' ';
1053
1054 if (i->second->is_properties()) {
1055 c = object.getDefaultDivision ();
1056 } else {
1057 c = object.getDefaultSeparator();
1058 }
1059
1060 i->second->write(out, (prefix + i->first + c).c_str(), postfix);
1061 }
1062
1063 out << flush;
1064
1065 return out;
1066 }

◆ write() [2/2]

virtual std::ostream & JEEP::JPropertiesTemplateElement< JProperties >::write ( std::ostream & out) const
inlineoverridevirtual

Stream output.

Parameters
outoutput stream
Returns
output stream

Reimplemented from JEEP::JPropertiesElementInterface.

Definition at line 1075 of file JProperties.hh.

1076 {
1077 return writeObject(out, object);
1078 }
std::ostream & writeObject(std::ostream &out, const T &object)
Stream output of object.

◆ is_properties()

virtual bool JEEP::JPropertiesTemplateElement< JProperties >::is_properties ( ) const
inlineoverridevirtual

Get properties type.

Returns
true

Reimplemented from JEEP::JPropertiesElementInterface.

Definition at line 1086 of file JProperties.hh.

1087 {
1088 return true;
1089 }

◆ equals()

virtual bool JEEP::JPropertiesElementInterface::equals ( const JPropertiesElementInterface & element) const
inlinevirtualinherited

Equality between property element interfaces.

Parameters
elementproperties element interface
Returns
false

Reimplemented in JEEP::JPropertiesTemplateElement< T >, and JEEP::JPropertiesTemplateElement< const T >.

Definition at line 96 of file JProperties.hh.

97 {
98 return false;
99 }

Member Data Documentation

◆ object

Definition at line 1093 of file JProperties.hh.


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