Mantid
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Attributes | Friends | List of all members
Mantid::Kernel::OptionalBool Class Reference

OptionalBool : Tri-state bool. More...

#include <OptionalBool.h>

Public Types

enum  Value { Unset , True , False }
 

Public Member Functions

Value getValue () const
 
bool operator!= (const OptionalBool &other) const
 
bool operator== (const OptionalBool &other) const
 
 OptionalBool ()
 
 OptionalBool (bool arg)
 
 OptionalBool (Value arg)
 
virtual ~OptionalBool ()=default
 

Static Public Member Functions

static std::map< Value, std::string > enumToStrMap ()
 
static std::map< std::string, ValuestrToEmumMap ()
 

Static Public Attributes

static const std::string StrFalse = "False"
 
static const std::string StrTrue = "True"
 
static const std::string StrUnset = "Unset"
 

Private Attributes

Value m_arg
 

Friends

MANTID_KERNEL_DLL std::ostream & operator<< (std::ostream &os, OptionalBool const &object)
 
MANTID_KERNEL_DLL std::istream & operator>> (std::istream &istream, OptionalBool &object)
 

Detailed Description

OptionalBool : Tri-state bool.

Defaults to unset.

Definition at line 25 of file OptionalBool.h.

Member Enumeration Documentation

◆ Value

Enumerator
Unset 
True 
False 

Definition at line 27 of file OptionalBool.h.

Constructor & Destructor Documentation

◆ OptionalBool() [1/3]

Mantid::Kernel::OptionalBool::OptionalBool ( )

Definition at line 20 of file OptionalBool.cpp.

◆ OptionalBool() [2/3]

Mantid::Kernel::OptionalBool::OptionalBool ( bool  arg)

Definition at line 22 of file OptionalBool.cpp.

References False, m_arg, and True.

◆ OptionalBool() [3/3]

Mantid::Kernel::OptionalBool::OptionalBool ( Value  arg)

Definition at line 24 of file OptionalBool.cpp.

◆ ~OptionalBool()

virtual Mantid::Kernel::OptionalBool::~OptionalBool ( )
virtualdefault

Member Function Documentation

◆ enumToStrMap()

std::map< OptionalBool::Value, std::string > Mantid::Kernel::OptionalBool::enumToStrMap ( )
static

Definition at line 48 of file OptionalBool.cpp.

References strToEmumMap().

◆ getValue()

OptionalBool::Value Mantid::Kernel::OptionalBool::getValue ( ) const

Definition at line 30 of file OptionalBool.cpp.

References m_arg.

Referenced by export_OptionalBool().

◆ operator!=()

bool Mantid::Kernel::OptionalBool::operator!= ( const OptionalBool other) const

Definition at line 28 of file OptionalBool.cpp.

References m_arg.

◆ operator==()

bool Mantid::Kernel::OptionalBool::operator== ( const OptionalBool other) const

Definition at line 26 of file OptionalBool.cpp.

References m_arg.

◆ strToEmumMap()

std::map< std::string, OptionalBool::Value > Mantid::Kernel::OptionalBool::strToEmumMap ( )
static

Definition at line 44 of file OptionalBool.cpp.

References False, StrFalse, StrTrue, StrUnset, True, and Unset.

Referenced by enumToStrMap().

Friends And Related Function Documentation

◆ operator<<

MANTID_KERNEL_DLL std::ostream & operator<< ( std::ostream &  os,
OptionalBool const &  object 
)
friend

Definition at line 32 of file OptionalBool.cpp.

◆ operator>>

MANTID_KERNEL_DLL std::istream & operator>> ( std::istream &  istream,
OptionalBool object 
)
friend

Definition at line 37 of file OptionalBool.cpp.

Member Data Documentation

◆ m_arg

Value Mantid::Kernel::OptionalBool::m_arg
private

Definition at line 47 of file OptionalBool.h.

Referenced by getValue(), operator!=(), operator==(), and OptionalBool().

◆ StrFalse

const std::string Mantid::Kernel::OptionalBool::StrFalse = "False"
static

Definition at line 31 of file OptionalBool.h.

Referenced by export_OptionalBoolValue(), and strToEmumMap().

◆ StrTrue

const std::string Mantid::Kernel::OptionalBool::StrTrue = "True"
static

Definition at line 32 of file OptionalBool.h.

Referenced by export_OptionalBoolValue(), and strToEmumMap().

◆ StrUnset

const std::string Mantid::Kernel::OptionalBool::StrUnset = "Unset"
static

Definition at line 30 of file OptionalBool.h.

Referenced by export_OptionalBoolValue(), and strToEmumMap().


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