Jpp  19.0.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Protected Attributes | Friends | List of all members
JOSCPROB::JOscParameter< T > Struct Template Referenceabstract

Abstract base class for oscillation parameter. More...

#include <JOscParameter.hh>

Inheritance diagram for JOSCPROB::JOscParameter< T >:
JLANG::JParameter< T > JLANG::JComparable< JParameter< T > > JOSCPROB::JComplexPhase< T > JOSCPROB::JMassSquaredDifference< T > JOSCPROB::JMixingAngle< T >

Public Types

typedef JParameter< TJParameter_t
 
typedef JParameter_t::argument_type argument_type
 
typedef JParameter_t::value_type value_type
 

Public Member Functions

 JOscParameter ()
 Default constructor. More...
 
 JOscParameter (argument_type value)
 Constructor. More...
 
JOscParameter< T > & operator= (const value_type &value)
 Assignment operator. More...
 
void setValue (const value_type &value)
 Set parameter. More...
 
virtual bool is_valid () const =0
 Check validity of oscillation parameter. More...
 
const value_type getValue () const
 Get value of parameter. More...
 
 operator const value_type () const
 Type conversion operator. More...
 
const bool isDefined () const
 Get status of parameter. More...
 
bool less (const JParameter< T > &parameter) const
 Less than method. More...
 

Protected Attributes

T __value
 
bool is_defined
 

Friends

std::istream & operator>> (std::istream &in, JOscParameter< T > &parameter)
 Stream input. More...
 

Detailed Description

template<class T>
struct JOSCPROB::JOscParameter< T >

Abstract base class for oscillation parameter.

Definition at line 28 of file JOscParameter.hh.

Member Typedef Documentation

template<class T>
typedef JParameter<T> JOSCPROB::JOscParameter< T >::JParameter_t

Definition at line 31 of file JOscParameter.hh.

Definition at line 33 of file JOscParameter.hh.

Definition at line 34 of file JOscParameter.hh.

Constructor & Destructor Documentation

template<class T>
JOSCPROB::JOscParameter< T >::JOscParameter ( )
inline

Default constructor.

Definition at line 40 of file JOscParameter.hh.

40  :
41  JParameter_t()
42  {}
JParameter< T > JParameter_t
template<class T>
JOSCPROB::JOscParameter< T >::JOscParameter ( argument_type  value)
inlineexplicit

Constructor.

Parameters
valueoscillation parameter value

Definition at line 50 of file JOscParameter.hh.

50  :
51  JParameter_t(value)
52  {}
JParameter< T > JParameter_t

Member Function Documentation

template<class T>
JOscParameter<T>& JOSCPROB::JOscParameter< T >::operator= ( const value_type value)
inline

Assignment operator.

Parameters
valueoscillation parameter value
Returns
oscillation parameter

Definition at line 61 of file JOscParameter.hh.

62  {
63  setValue(value);
64 
65  return *this;
66  }
void setValue(const value_type &value)
Set parameter.
template<class T>
void JOSCPROB::JOscParameter< T >::setValue ( const value_type value)
inline

Set parameter.

Parameters
valueoscillation parameter value

Definition at line 74 of file JOscParameter.hh.

75  {
76  using namespace JPP;
77 
79 
80  if (!this->is_valid()) {
81  THROW(JValueOutOfRange, "JOscParameter<T>::setValue(): Given oscillation parameter is invalid " << value);
82  }
83  }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Definition: JException.hh:712
virtual bool is_valid() const =0
Check validity of oscillation parameter.
void setValue(const value_type &value)
Set value.
Definition: JParameter.hh:93
template<class T>
virtual bool JOSCPROB::JOscParameter< T >::is_valid ( ) const
pure virtual
template<class T>
const value_type JLANG::JParameter< T >::getValue ( ) const
inlineinherited

Get value of parameter.

Returns
value

Definition at line 82 of file JParameter.hh.

83  {
84  return __value;
85  }
template<class T>
JLANG::JParameter< T >::operator const value_type ( ) const
inlineinherited

Type conversion operator.

Returns
value

Definition at line 105 of file JParameter.hh.

106  {
107  return getValue();
108  }
const value_type getValue() const
Get value of parameter.
Definition: JParameter.hh:82
template<class T>
const bool JLANG::JParameter< T >::isDefined ( ) const
inlineinherited

Get status of parameter.

Returns
true if value has been defined (by read or assignment); else false

Definition at line 116 of file JParameter.hh.

117  {
118  return is_defined;
119  }
template<class T>
bool JLANG::JParameter< T >::less ( const JParameter< T > &  parameter) const
inlineinherited

Less than method.

This method evaluates to true if both parameter values are defined and this value is less than the value of the given parameter object.

Parameters
parameterparameter
Returns
true if both defined and first value less than second value; else false

Definition at line 131 of file JParameter.hh.

132  {
133  return this->isDefined() && parameter.isDefined() && this->getValue() < parameter.getValue();
134  }
const bool isDefined() const
Get status of parameter.
Definition: JParameter.hh:116
const value_type getValue() const
Get value of parameter.
Definition: JParameter.hh:82

Friends And Related Function Documentation

template<class T>
std::istream& operator>> ( std::istream &  in,
JOscParameter< T > &  parameter 
)
friend

Stream input.

Parameters
ininput stream
parameteroscillation parameter
Returns
input stream

Definition at line 101 of file JOscParameter.hh.

102  {
103  using namespace JPP;
104 
105  in >> static_cast<JParameter_t&>(parameter);
106 
107  if (!parameter.is_valid()) {
108  THROW(JValueOutOfRange, "JOscParameter<T>::operator>>(): Given oscillation parameter is invalid " << parameter);
109  }
110 
111  return in;
112  }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Definition: JException.hh:712
JParameter< T > JParameter_t
virtual bool is_valid() const =0
Check validity of oscillation parameter.
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

Member Data Documentation

template<class T>
T JLANG::JParameter< T >::__value
protectedinherited

Definition at line 172 of file JParameter.hh.

template<class T>
bool JLANG::JParameter< T >::is_defined
protectedinherited

Definition at line 173 of file JParameter.hh.


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