Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
SimmCalibration::Amount Class Reference

#include <orea/simm/simmcalibration.hpp>

+ Inheritance diagram for SimmCalibration::Amount:
+ Collaboration diagram for SimmCalibration::Amount:

Public Member Functions

 Amount ()
 
 Amount (const std::string &bucket, const std::string &label1, const std::string &label2, const std::string &value)
 
 Amount (const std::tuple< std::string, std::string, std::string > &key, const std::string &value)
 
 Amount (ore::data::XMLNode *node)
 
ore::data::XMLNodetoXML (ore::data::XMLDocument &doc) const override
 
void fromXML (ore::data::XMLNode *node) override
 
const std::tuple< std::string, std::string, std::string > key () const
 
const std::string & bucket () const
 
const std::string & label1 () const
 
const std::string & label2 () const
 
const std::string & value () const
 
- Public Member Functions inherited from XMLSerializable
virtual ~XMLSerializable ()
 
virtual void fromXML (XMLNode *node)=0
 
virtual XMLNodetoXML (XMLDocument &doc) const=0
 
void fromFile (const std::string &filename)
 
void toFile (const std::string &filename) const
 
void fromXMLString (const std::string &xml)
 
std::string toXMLString () const
 

Private Attributes

std::string bucket_
 
std::string label1_
 
std::string label2_
 
std::string value_
 

Detailed Description

Definition at line 41 of file simmcalibration.hpp.

Constructor & Destructor Documentation

◆ Amount() [1/4]

Amount ( )

Definition at line 43 of file simmcalibration.hpp.

43{}

◆ Amount() [2/4]

Amount ( const std::string &  bucket,
const std::string &  label1,
const std::string &  label2,
const std::string &  value 
)

◆ Amount() [3/4]

Amount ( const std::tuple< std::string, std::string, std::string > &  key,
const std::string &  value 
)

◆ Amount() [4/4]

Definition at line 48 of file simmcalibration.hpp.

48{ fromXML(node); }
void fromXML(ore::data::XMLNode *node) override
+ Here is the call graph for this function:

Member Function Documentation

◆ toXML()

XMLNode * toXML ( ore::data::XMLDocument doc) const
overridevirtual

Implements XMLSerializable.

Definition at line 65 of file simmcalibration.cpp.

65 {
66 auto amountNode = doc.allocNode("Amount", value_);
67 if (!bucket_.empty())
68 XMLUtils::addAttribute(doc, amountNode, "bucket", bucket_);
69 if (!label1_.empty())
70 XMLUtils::addAttribute(doc, amountNode, "label1", label1_);
71 if (!label2_.empty())
72 XMLUtils::addAttribute(doc, amountNode, "label2", label2_);
73 return amountNode;
74}
XMLNode * allocNode(const string &nodeName)
static void addAttribute(XMLDocument &doc, XMLNode *node, const string &attrName, const string &attrValue)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fromXML()

void fromXML ( ore::data::XMLNode node)
overridevirtual

Implements XMLSerializable.

Definition at line 76 of file simmcalibration.cpp.

76 {
77 bucket_ = XMLUtils::getAttribute(node, "bucket");
78 label1_ = XMLUtils::getAttribute(node, "label1");
79 label2_ = XMLUtils::getAttribute(node, "label2");
81}
static string getAttribute(XMLNode *node, const string &attrName)
static string getNodeValue(XMLNode *node)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ key()

const tuple< string, string, string > key ( ) const

Definition at line 83 of file simmcalibration.cpp.

83 {
84 return std::make_tuple(bucket_, label1_, label2_);
85}
+ Here is the caller graph for this function:

◆ bucket()

const std::string & bucket ( ) const

Definition at line 55 of file simmcalibration.hpp.

55{ return bucket_; }

◆ label1()

const std::string & label1 ( ) const

Definition at line 56 of file simmcalibration.hpp.

56{ return label1_; }

◆ label2()

const std::string & label2 ( ) const

Definition at line 57 of file simmcalibration.hpp.

57{ return label2_; }

◆ value()

const std::string & value ( ) const

Definition at line 58 of file simmcalibration.hpp.

58{ return value_; }
+ Here is the caller graph for this function:

Member Data Documentation

◆ bucket_

std::string bucket_
private

Definition at line 61 of file simmcalibration.hpp.

◆ label1_

std::string label1_
private

Definition at line 61 of file simmcalibration.hpp.

◆ label2_

std::string label2_
private

Definition at line 61 of file simmcalibration.hpp.

◆ value_

std::string value_
private

Definition at line 61 of file simmcalibration.hpp.