BPMN-OS
BPMN for optimization and simulation
Loading...
Searching...
No Matches
XML::Value Struct Reference

A struct representing the value of an XML-node attribute. More...

Detailed Description

The Value struct stores a value and provides implicit conversion and assignment operators to facilitate easy conversion between different types and convenient assignment of values.

Example usage:

value = std::to_string("a_string"); // Assignment using a std::string.
value = true; // Assignment using a bool.
value = 42; // Assignment using an int.
value = 3.14; // Assignment using a double.
std::string stringValue = value; // Implicit conversion to std::string.
bool booleanValue = value; // Implicit conversion to bool.
int integerValue = value; // Implicit conversion to int.
double realValue = value; // Implicit conversion to double.
A struct representing the value of an XML-node attribute.
Definition XMLObject.h:48
std::string value
Definition bpmn++.h:50

Definition at line 48 of file XMLObject.h.

#include <bpmn++.h>

Public Member Functions

 operator std::string_view () const
 
 operator std::string () const
 
 operator bool () const
 
 operator int () const
 
 operator double () const
 
Valueoperator= (const std::string &s)
 
Valueoperator= (bool b)
 
Valueoperator= (int i)
 
Valueoperator= (double d)
 
 Value (const std::string &s)
 
 Value (bool b)
 
 Value (int i)
 
 Value (double d)
 
 operator std::string_view () const
 
 operator std::string () const
 
 operator bool () const
 
 operator int () const
 
 operator double () const
 
Valueoperator= (const std::string &s)
 
Valueoperator= (bool b)
 
Valueoperator= (int i)
 
Valueoperator= (double d)
 
 Value (const std::string &s)
 
 Value (bool b)
 
 Value (int i)
 
 Value (double d)
 

Public Attributes

std::string value
 

Static Public Attributes

static std::string True = "true"
 
static std::string False = "false"
 

Constructor & Destructor Documentation

◆ Value() [1/8]

XML::Value::Value ( const std::string & s)
inline

Definition at line 60 of file bpmn++.h.

◆ Value() [2/8]

XML::Value::Value ( bool b)
inline

Definition at line 61 of file bpmn++.h.

◆ Value() [3/8]

XML::Value::Value ( int i)
inline

Definition at line 62 of file bpmn++.h.

◆ Value() [4/8]

XML::Value::Value ( double d)
inline

Definition at line 63 of file bpmn++.h.

◆ Value() [5/8]

XML::Value::Value ( const std::string & s)
inline

Definition at line 59 of file XMLObject.h.

◆ Value() [6/8]

XML::Value::Value ( bool b)
inline

Definition at line 60 of file XMLObject.h.

◆ Value() [7/8]

XML::Value::Value ( int i)
inline

Definition at line 61 of file XMLObject.h.

◆ Value() [8/8]

XML::Value::Value ( double d)
inline

Definition at line 62 of file XMLObject.h.

Member Function Documentation

◆ operator bool() [1/2]

XML::Value::operator bool ( ) const
inline

Definition at line 52 of file XMLObject.h.

◆ operator bool() [2/2]

XML::Value::operator bool ( ) const
inline

Definition at line 53 of file bpmn++.h.

◆ operator double() [1/2]

XML::Value::operator double ( ) const
inline

Definition at line 54 of file XMLObject.h.

◆ operator double() [2/2]

XML::Value::operator double ( ) const
inline

Definition at line 55 of file bpmn++.h.

◆ operator int() [1/2]

XML::Value::operator int ( ) const
inline

Definition at line 53 of file XMLObject.h.

◆ operator int() [2/2]

XML::Value::operator int ( ) const
inline

Definition at line 54 of file bpmn++.h.

◆ operator std::string() [1/2]

XML::Value::operator std::string ( ) const
inline

Definition at line 51 of file XMLObject.h.

◆ operator std::string() [2/2]

XML::Value::operator std::string ( ) const
inline

Definition at line 52 of file bpmn++.h.

◆ operator std::string_view() [1/2]

XML::Value::operator std::string_view ( ) const
inline

Definition at line 50 of file XMLObject.h.

◆ operator std::string_view() [2/2]

XML::Value::operator std::string_view ( ) const
inline

Definition at line 51 of file bpmn++.h.

◆ operator=() [1/8]

Value & XML::Value::operator= ( bool b)
inline

Definition at line 56 of file XMLObject.h.

◆ operator=() [2/8]

Value & XML::Value::operator= ( bool b)
inline

Definition at line 57 of file bpmn++.h.

◆ operator=() [3/8]

Value & XML::Value::operator= ( const std::string & s)
inline

Definition at line 55 of file XMLObject.h.

◆ operator=() [4/8]

Value & XML::Value::operator= ( const std::string & s)
inline

Definition at line 56 of file bpmn++.h.

◆ operator=() [5/8]

Value & XML::Value::operator= ( double d)
inline

Definition at line 58 of file XMLObject.h.

◆ operator=() [6/8]

Value & XML::Value::operator= ( double d)
inline

Definition at line 59 of file bpmn++.h.

◆ operator=() [7/8]

Value & XML::Value::operator= ( int i)
inline

Definition at line 57 of file XMLObject.h.

◆ operator=() [8/8]

Value & XML::Value::operator= ( int i)
inline

Definition at line 58 of file bpmn++.h.

Member Data Documentation

◆ False

static std::string XML::Value::False = "false"
inlinestatic

Definition at line 65 of file bpmn++.h.

◆ True

static std::string XML::Value::True = "true"
inlinestatic

Definition at line 64 of file bpmn++.h.

◆ value

std::string XML::Value::value

Definition at line 50 of file bpmn++.h.


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