Jpp  18.6.0-rc.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Protected Attributes | Friends | List of all members
JLANG::JStatic< T, N > Struct Template Reference

Template data structure for static member declaration. More...

#include <JStatic.hh>

Inheritance diagram for JLANG::JStatic< T, N >:
JLANG::JEquals< JStatic< T, N >, T >

Public Types

typedef JClass< T >::argument_type argument_type
 

Public Member Functions

 JStatic (argument_type value)
 Constructor. More...
 
JStaticoperator= (argument_type value)
 Assignment operator. More...
 
 operator const T & () const
 Type conversion operator. More...
 
 operator T & ()
 Type conversion operator. More...
 
const Toperator-> () const
 Smart pointer. More...
 
Toperator-> ()
 Smart pointer. More...
 
bool equals (const JStatic &object) const
 Equals method. More...
 
bool equals (argument_type value) const
 Equals method. More...
 

Static Protected Attributes

static T value
 Declaration of static data member. More...
 

Friends

std::istream & operator>> (std::istream &in, JStatic &object)
 Read static object from input stream. More...
 
std::ostream & operator<< (std::ostream &out, const JStatic &object)
 Write static object to output stream. More...
 

Detailed Description

template<class T, int N>
struct JLANG::JStatic< T, N >

Template data structure for static member declaration.

Definition at line 20 of file JStatic.hh.

Member Typedef Documentation

template<class T , int N>
typedef JClass<T>::argument_type JLANG::JStatic< T, N >::argument_type

Definition at line 24 of file JStatic.hh.

Constructor & Destructor Documentation

template<class T , int N>
JLANG::JStatic< T, N >::JStatic ( argument_type  value)
inline

Constructor.

Parameters
valuevalue

Definition at line 32 of file JStatic.hh.

33  {
34  this->value = value;
35  }
static T value
Declaration of static data member.
Definition: JStatic.hh:146

Member Function Documentation

template<class T , int N>
JStatic& JLANG::JStatic< T, N >::operator= ( argument_type  value)
inline

Assignment operator.

Parameters
valuevalue
Returns
this value

Definition at line 44 of file JStatic.hh.

45  {
46  this->value = value;
47 
48  return *this;
49  }
static T value
Declaration of static data member.
Definition: JStatic.hh:146
template<class T , int N>
JLANG::JStatic< T, N >::operator const T & ( ) const
inline

Type conversion operator.

Returns
value

Definition at line 57 of file JStatic.hh.

58  {
59  return value;
60  }
static T value
Declaration of static data member.
Definition: JStatic.hh:146
template<class T , int N>
JLANG::JStatic< T, N >::operator T & ( )
inline

Type conversion operator.

Returns
value

Definition at line 68 of file JStatic.hh.

69  {
70  return value;
71  }
static T value
Declaration of static data member.
Definition: JStatic.hh:146
template<class T , int N>
const T* JLANG::JStatic< T, N >::operator-> ( ) const
inline

Smart pointer.

Returns
value

Definition at line 79 of file JStatic.hh.

80  {
81  return &value;
82  }
static T value
Declaration of static data member.
Definition: JStatic.hh:146
template<class T , int N>
T* JLANG::JStatic< T, N >::operator-> ( )
inline

Smart pointer.

Returns
value

Definition at line 90 of file JStatic.hh.

91  {
92  return &value;
93  }
static T value
Declaration of static data member.
Definition: JStatic.hh:146
template<class T , int N>
bool JLANG::JStatic< T, N >::equals ( const JStatic< T, N > &  object) const
inline

Equals method.

Parameters
objectobject
Returns
true if this object equals given object; else false

Definition at line 102 of file JStatic.hh.

103  {
104  return this->value == object.value;
105  }
static T value
Declaration of static data member.
Definition: JStatic.hh:146
template<class T , int N>
bool JLANG::JStatic< T, N >::equals ( argument_type  value) const
inline

Equals method.

Parameters
valuevalue
Returns
true if this value equals given value; else false

Definition at line 114 of file JStatic.hh.

115  {
116  return this->value == value;
117  }
static T value
Declaration of static data member.
Definition: JStatic.hh:146

Friends And Related Function Documentation

template<class T , int N>
std::istream& operator>> ( std::istream &  in,
JStatic< T, N > &  object 
)
friend

Read static object from input stream.

Parameters
ininput stream
objectobject
Returns
input stream

Definition at line 127 of file JStatic.hh.

128  {
129  return in >> object.value;
130  }
then fatal The output file must have the wildcard in the e g root fi eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
Definition: JCanberra.sh:48
template<class T , int N>
std::ostream& operator<< ( std::ostream &  out,
const JStatic< T, N > &  object 
)
friend

Write static object to output stream.

Parameters
outoutput stream
objectobject
Returns
output stream

Definition at line 140 of file JStatic.hh.

141  {
142  return out << object.value;
143  }

Member Data Documentation

template<class T , int N>
T JLANG::JStatic< T, N >::value
staticprotected

Declaration of static data member.

Definition at line 146 of file JStatic.hh.


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