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

This class stores information about the parameters used by an algorithm. More...

#include <API/MAntidAPI/PropertyHistory.h>

Public Member Functions

unsigned int direction () const
 get direction flag of algorithm parameter const More...
 
bool isDefault () const
 get isdefault flag of algorithm parameter const More...
 
bool isEmptyDefault () const
 get whether algorithm parameter was left as default EMPTY_INT,LONG,DBL const More...
 
const std::string & name () const
 get name of algorithm parameter const More...
 
bool operator== (const PropertyHistory &other) const
 this is required for boost.python More...
 
void printSelf (std::ostream &, const int indent=0, const size_t maxPropertyLength=0) const
 print contents of object More...
 
 PropertyHistory (Property const *const prop)
 construct a property history from a property object More...
 
 PropertyHistory (std::string name, std::string value, std::string type, const bool isdefault, const unsigned int direction=99)
 Constructor. More...
 
void setValue (const std::string &value)
 set value of algorithm parameter More...
 
const std::string & type () const
 get type of algorithm parameter const More...
 
const std::string & value () const
 get value of algorithm parameter const More...
 
virtual ~PropertyHistory ()=default
 destructor More...
 

Private Attributes

unsigned int m_direction
 direction of parameter More...
 
bool m_isDefault
 flag defining if the parameter is a default or a user-defined parameter More...
 
std::string m_name
 The name of the parameter. More...
 
std::string m_type
 The type of the parameter. More...
 
std::string m_value
 The value of the parameter. More...
 

Detailed Description

This class stores information about the parameters used by an algorithm.

Author
Dickon Champion, ISIS, RAL
Date
21/01/2008

Definition at line 34 of file PropertyHistory.h.

Constructor & Destructor Documentation

◆ PropertyHistory() [1/2]

Mantid::Kernel::PropertyHistory::PropertyHistory ( std::string  name,
std::string  value,
std::string  type,
const bool  isdefault,
const unsigned int  direction = 99 
)

Constructor.

Definition at line 24 of file PropertyHistory.cpp.

◆ PropertyHistory() [2/2]

Mantid::Kernel::PropertyHistory::PropertyHistory ( Property const *const  prop)

construct a property history from a property object

Definition at line 29 of file PropertyHistory.cpp.

◆ ~PropertyHistory()

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

destructor

Member Function Documentation

◆ direction()

unsigned int Mantid::Kernel::PropertyHistory::direction ( ) const
inline

get direction flag of algorithm parameter const

Definition at line 54 of file PropertyHistory.h.

Referenced by Mantid::API::ScriptBuilder::buildPropertyString(), and export_PropertyHistory().

◆ isDefault()

bool Mantid::Kernel::PropertyHistory::isDefault ( ) const
inline

get isdefault flag of algorithm parameter const

Definition at line 52 of file PropertyHistory.h.

Referenced by Mantid::API::ScriptBuilder::buildPropertyString(), and export_PropertyHistory().

◆ isEmptyDefault()

bool Mantid::Kernel::PropertyHistory::isEmptyDefault ( ) const

get whether algorithm parameter was left as default EMPTY_INT,LONG,DBL const

Returns whether algorithm parameter was left as default EMPTY_INT,LONG,DBL.

Returns
True if param was unset and value = EMPTY_XXX, else false

Definition at line 64 of file PropertyHistory.cpp.

References Mantid::EMPTY_DBL(), Mantid::EMPTY_INT(), Mantid::EMPTY_LONG(), Mantid::Kernel::getUnmangledTypeName(), m_direction, m_isDefault, m_type, m_value, Mantid::Kernel::Direction::Output, and std::to_string().

◆ name()

const std::string & Mantid::Kernel::PropertyHistory::name ( ) const
inline

get name of algorithm parameter const

Definition at line 44 of file PropertyHistory.h.

Referenced by Mantid::API::ScriptBuilder::buildPropertyString(), and export_PropertyHistory().

◆ operator==()

bool Mantid::Kernel::PropertyHistory::operator== ( const PropertyHistory other) const
inline

this is required for boost.python

Definition at line 62 of file PropertyHistory.h.

References value.

◆ printSelf()

void Mantid::Kernel::PropertyHistory::printSelf ( std::ostream &  os,
const int  indent = 0,
const size_t  maxPropertyLength = 0 
) const

print contents of object

Prints a text representation of itself.

Parameters
os:: The output stream to write to
indent:: an indentation value to make pretty printing of object and sub-objects
maxPropertyLength:: the max length for any property value string (0 = full length)

Definition at line 40 of file PropertyHistory.cpp.

References Mantid::Kernel::Direction::asText(), m_direction, m_isDefault, m_name, m_value, and Mantid::Kernel::Strings::shorten().

Referenced by Mantid::Kernel::operator<<().

◆ setValue()

void Mantid::Kernel::PropertyHistory::setValue ( const std::string &  value)
inline

set value of algorithm parameter

Definition at line 48 of file PropertyHistory.h.

References m_value, and value.

◆ type()

const std::string & Mantid::Kernel::PropertyHistory::type ( ) const
inline

get type of algorithm parameter const

Definition at line 50 of file PropertyHistory.h.

Referenced by Mantid::API::ScriptBuilder::buildPropertyString(), and export_PropertyHistory().

◆ value()

const std::string & Mantid::Kernel::PropertyHistory::value ( ) const
inline

get value of algorithm parameter const

Definition at line 46 of file PropertyHistory.h.

References m_value.

Referenced by Mantid::API::ScriptBuilder::buildPropertyString(), and export_PropertyHistory().

Member Data Documentation

◆ m_direction

unsigned int Mantid::Kernel::PropertyHistory::m_direction
private

direction of parameter

Definition at line 77 of file PropertyHistory.h.

Referenced by isEmptyDefault(), and printSelf().

◆ m_isDefault

bool Mantid::Kernel::PropertyHistory::m_isDefault
private

flag defining if the parameter is a default or a user-defined parameter

Definition at line 75 of file PropertyHistory.h.

Referenced by isEmptyDefault(), and printSelf().

◆ m_name

std::string Mantid::Kernel::PropertyHistory::m_name
private

The name of the parameter.

Definition at line 69 of file PropertyHistory.h.

Referenced by printSelf().

◆ m_type

std::string Mantid::Kernel::PropertyHistory::m_type
private

The type of the parameter.

Definition at line 73 of file PropertyHistory.h.

Referenced by isEmptyDefault().

◆ m_value

std::string Mantid::Kernel::PropertyHistory::m_value
private

The value of the parameter.

Definition at line 71 of file PropertyHistory.h.

Referenced by isEmptyDefault(), and printSelf().


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