Jpp  18.0.1-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 Public Member Functions | Static Public Attributes | List of all members
JLANG::JBool< __value__ > Struct Template Reference

Auxiliary template class for type bool. More...

#include <JBool.hh>

Public Types

typedef JBool< __value__ > bool_type
 Type definition of bool value. More...
 

Public Member Functions

 JBool ()
 Default construcor. More...
 
 operator bool () const
 Type conversion operator. More...
 

Static Public Member Functions

static JBool<!valuec_not ()
 Make logical NOT. More...
 
template<bool option>
static JBool< value==option > c_equals ()
 Make logical EQUALS. More...
 
template<bool option>
static JBool< value==option > c_equals (const JBool< option > &object)
 Make logical EQUALS. More...
 
template<bool option>
static JBool< value &&option > c_and ()
 Make logical AND. More...
 
template<bool option>
static JBool< value &&option > c_and (const JBool< option > &object)
 Make logical AND. More...
 
template<bool option>
static JBool< value||option > c_or ()
 Make logical OR. More...
 
template<bool option>
static JBool< value||option > c_or (const JBool< option > &object)
 Make logical OR. More...
 
template<bool option>
static JBool< value!=option > c_xor ()
 Make logical XOR. More...
 
template<bool option>
static JBool< value!=option > c_xor (const JBool< option > &object)
 Make logical XOR. More...
 
template<bool __first__, bool __second__>
static JBool<(value
&&__first__)||(!value
&&__second__)> 
c_switch ()
 Make logical SWITCH. More...
 
template<bool __first__, bool __second__>
static JBool<(value
&&__first__)||(!value
&&__second__)> 
c_switch (const JBool< __first__ > &first, const JBool< __second__ > &second)
 Make logical SWITCH. More...
 

Static Public Attributes

static const bool value = __value__
 Value. More...
 

Detailed Description

template<bool __value__>
struct JLANG::JBool< __value__ >

Auxiliary template class for type bool.

This class can be used for boolean expressions at compile time.

Definition at line 20 of file JBool.hh.

Member Typedef Documentation

template<bool __value__>
typedef JBool<__value__> JLANG::JBool< __value__ >::bool_type

Type definition of bool value.

Definition at line 25 of file JBool.hh.

Constructor & Destructor Documentation

template<bool __value__>
JLANG::JBool< __value__ >::JBool ( )
inline

Default construcor.

Definition at line 31 of file JBool.hh.

32  {}

Member Function Documentation

template<bool __value__>
JLANG::JBool< __value__ >::operator bool ( ) const
inline

Type conversion operator.

Returns
value

Definition at line 46 of file JBool.hh.

47  {
48  return value;
49  }
static const bool value
Value.
Definition: JBool.hh:38
template<bool __value__>
static JBool<!value> JLANG::JBool< __value__ >::c_not ( )
inlinestatic

Make logical NOT.

Returns
logical NOT

Definition at line 57 of file JBool.hh.

58  {
59  return JBool<!value>();
60  }
Auxiliary template class for type bool.
Definition: JBool.hh:20
template<bool __value__>
template<bool option>
static JBool<value == option> JLANG::JBool< __value__ >::c_equals ( )
inlinestatic

Make logical EQUALS.

Returns
logical EQUALS

Definition at line 69 of file JBool.hh.

70  {
71  return JBool<value == option>();
72  }
Auxiliary template class for type bool.
Definition: JBool.hh:20
template<bool __value__>
template<bool option>
static JBool<value == option> JLANG::JBool< __value__ >::c_equals ( const JBool< option > &  object)
inlinestatic

Make logical EQUALS.

Parameters
objectvalue
Returns
logical EQUALS

Definition at line 82 of file JBool.hh.

83  {
84  return bool_type::c_equals<option>();
85  }
template<bool __value__>
template<bool option>
static JBool<value && option> JLANG::JBool< __value__ >::c_and ( )
inlinestatic

Make logical AND.

Returns
logical AND

Definition at line 94 of file JBool.hh.

95  {
96  return JBool<value && option>();
97  }
Auxiliary template class for type bool.
Definition: JBool.hh:20
template<bool __value__>
template<bool option>
static JBool<value && option> JLANG::JBool< __value__ >::c_and ( const JBool< option > &  object)
inlinestatic

Make logical AND.

Parameters
objectvalue
Returns
logical AND

Definition at line 107 of file JBool.hh.

108  {
109  return bool_type::c_and<option>();
110  }
template<bool __value__>
template<bool option>
static JBool<value || option> JLANG::JBool< __value__ >::c_or ( )
inlinestatic

Make logical OR.

Returns
logical OR

Definition at line 119 of file JBool.hh.

120  {
121  return JBool<value || option>();
122  }
Auxiliary template class for type bool.
Definition: JBool.hh:20
template<bool __value__>
template<bool option>
static JBool<value || option> JLANG::JBool< __value__ >::c_or ( const JBool< option > &  object)
inlinestatic

Make logical OR.

Parameters
objectvalue
Returns
logical OR

Definition at line 132 of file JBool.hh.

133  {
134  return bool_type::c_or<option>();
135  }
template<bool __value__>
template<bool option>
static JBool<value != option> JLANG::JBool< __value__ >::c_xor ( )
inlinestatic

Make logical XOR.

Returns
logical XOR

Definition at line 144 of file JBool.hh.

145  {
146  return JBool<value != option>();
147  }
Auxiliary template class for type bool.
Definition: JBool.hh:20
template<bool __value__>
template<bool option>
static JBool<value != option> JLANG::JBool< __value__ >::c_xor ( const JBool< option > &  object)
inlinestatic

Make logical XOR.

Parameters
objectvalue
Returns
logical XOR

Definition at line 157 of file JBool.hh.

158  {
159  return bool_type::c_xor<option>();
160  }
template<bool __value__>
template<bool __first__, bool __second__>
static JBool<(value && __first__) || (!value && __second__)> JLANG::JBool< __value__ >::c_switch ( )
inlinestatic

Make logical SWITCH.

If value is true, select first, else select second.

Returns
logical SWITCH

Definition at line 170 of file JBool.hh.

171  {
173  }
Auxiliary template class for type bool.
Definition: JBool.hh:20
template<bool __value__>
template<bool __first__, bool __second__>
static JBool<(value && __first__) || (!value && __second__)> JLANG::JBool< __value__ >::c_switch ( const JBool< __first__ > &  first,
const JBool< __second__ > &  second 
)
inlinestatic

Make logical SWITCH.

If value is true, select first, else select second.

Parameters
firstfirst value
secondsecond value
Returns
logical SWITCH

Definition at line 185 of file JBool.hh.

187  {
188  return bool_type::c_switch<__first__, __second__>();
189  }

Member Data Documentation

template<bool __value__>
const bool JLANG::JBool< __value__ >::value = __value__
static

Value.

Definition at line 38 of file JBool.hh.


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