Jpp  18.3.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Attributes | Friends | List of all members
JEEP::JPropertiesTemplateElement< const T > Class Template Reference

Template specialisation of JPropertiesTemplateElement for const data type. More...

#include <JProperties.hh>

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

Public Member Functions

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

Protected Attributes

const Tobject
 

Friends

class JPropertiesElement
 

Detailed Description

template<class T>
class JEEP::JPropertiesTemplateElement< const T >

Template specialisation of JPropertiesTemplateElement for const data type.

This class implements the JPropertiesElementInterface interface.

Definition at line 208 of file JProperties.hh.

Constructor & Destructor Documentation

template<class T >
JEEP::JPropertiesTemplateElement< const T >::JPropertiesTemplateElement ( const T value)
inline

Constructor.

Parameters
valuereference of template object

Definition at line 220 of file JProperties.hh.

220  :
222  object(value)
223  {}
Interface for I/O of properties element.
Definition: JProperties.hh:66

Member Function Documentation

template<class T >
virtual std::istream& JEEP::JPropertiesTemplateElement< const T >::read ( std::istream &  in)
inlineoverridevirtual

Stream input.

Parameters
ininput stream
Returns
input stream

Implements JLANG::JStreamInput.

Definition at line 232 of file JProperties.hh.

233  {
234  THROW(JPropertiesException, "JPropertiesTemplateElement<>::read() reading of const data type.");
235  }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Definition: JException.hh:712
template<class T >
virtual std::ostream& JEEP::JPropertiesTemplateElement< const T >::write ( std::ostream &  out) const
inlineoverridevirtual

Stream output.

Parameters
outoutput stream
Returns
output stream

Implements JLANG::JStreamOutput.

Definition at line 244 of file JProperties.hh.

245  {
246  return writeObject(out, object);
247  }
std::ostream & writeObject(std::ostream &out, const T &object)
Stream output of object.
template<class T >
virtual std::ostream& JEEP::JPropertiesTemplateElement< const T >::write ( std::ostream &  out,
const char *  prefix,
const char  postfix 
) const
inlineoverridevirtual

Stream output.

Parameters
outoutput stream
prefixprefix
postfixpostfix
Returns
output stream

Implements JLANG::JStreamSuffixOutput.

Definition at line 258 of file JProperties.hh.

261  {
262  return writeObject(out, prefix, object, postfix);
263  }
std::ostream & writeObject(std::ostream &out, const T &object)
Stream output of object.
template<class T >
virtual bool JEEP::JPropertiesTemplateElement< const T >::equals ( const JPropertiesElementInterface element) const
inlineoverridevirtual

Equality between property element interfaces.

Parameters
elementproperties element interface
Returns
true if equal; else false

Reimplemented from JEEP::JPropertiesElementInterface.

Definition at line 272 of file JProperties.hh.

273  {
274  const JPropertiesTemplateElement<const T>* p = dynamic_cast<const JPropertiesTemplateElement<const T>*>(&element);
275 
276  if (p != NULL)
277  return compareObjects(object, p->object);
278  else
279  return false;
280  }
Template specialisation of JPropertiesTemplateElement for const data type.
Definition: JProperties.hh:208
bool compareObjects(const T &first, const T &second, JBool< true >)
Comparison of comparable objects.
virtual bool JEEP::JPropertiesElementInterface::is_properties ( ) const
inlinevirtualinherited

Get properties type.

Returns
false

Reimplemented in JEEP::JPropertiesTemplateElement< JProperties >.

Definition at line 82 of file JProperties.hh.

83  {
84  return false;
85  }

Friends And Related Function Documentation

template<class T >
friend class JPropertiesElement
friend

Definition at line 212 of file JProperties.hh.

Member Data Documentation

template<class T >
const T& JEEP::JPropertiesTemplateElement< const T >::object
protected

Definition at line 284 of file JProperties.hh.


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