PandA-2024.02
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes
attribute Struct Reference

#include <library_manager.hpp>

Public Types

using value_t = enum { FLOAT64=0, BOOLEAN, INT32, STRING }
 

Public Member Functions

 attribute (const value_t _value_type, std::string _content)
 
 attribute (const std::string &_value_type, std::string _content)
 
 attribute (const std::vector< attributeRef > &_content)
 
std::string get_value_type_str () const
 
std::string get_content_str () const
 
bool has_list () const
 
unsigned int get_value_type () const
 
template<class G >
get_content () const
 
const std::vector< attributeRef > & get_content_list () const
 
void xwrite (xml_element *xml_node, const std::string &name)
 

Static Public Member Functions

static void xload (const xml_element *EnodeC, std::vector< std::string > &ordered_attributes, std::map< std::string, attributeRef > &attributes)
 

Private Attributes

std::string content
 
value_t value_type {FLOAT64}
 
std::vector< attributeRefcontent_list
 

Detailed Description

Definition at line 70 of file library_manager.hpp.

Member Typedef Documentation

◆ value_t

using attribute::value_t = enum { FLOAT64 = 0, BOOLEAN, INT32, STRING }

Definition at line 73 of file library_manager.hpp.

Constructor & Destructor Documentation

◆ attribute() [1/3]

attribute::attribute ( const value_t  _value_type,
std::string  _content 
)

Definition at line 91 of file library_manager.cpp.

References content, xml_node::convert_escaped(), and value_type.

Referenced by xload().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ attribute() [2/3]

attribute::attribute ( const std::string &  _value_type,
std::string  _content 
)

Definition at line 66 of file library_manager.cpp.

References BOOLEAN, content, xml_node::convert_escaped(), THROW_ERROR, and value_type.

Here is the call graph for this function:

◆ attribute() [3/3]

attribute::attribute ( const std::vector< attributeRef > &  _content)
explicit

Definition at line 61 of file library_manager.cpp.

References content_list.

Member Function Documentation

◆ get_content()

template<class G >
G attribute::get_content ( ) const
inline

Definition at line 98 of file library_manager.hpp.

References content.

◆ get_content_list()

const std::vector<attributeRef>& attribute::get_content_list ( ) const
inline

Definition at line 103 of file library_manager.hpp.

References content_list, xload(), and xwrite().

Here is the call graph for this function:

◆ get_content_str()

std::string attribute::get_content_str ( ) const

fix for content_list

Definition at line 123 of file library_manager.cpp.

References content.

Referenced by xwrite().

Here is the caller graph for this function:

◆ get_value_type()

unsigned int attribute::get_value_type ( ) const

Definition at line 134 of file library_manager.cpp.

References value_type.

◆ get_value_type_str()

std::string attribute::get_value_type_str ( ) const

Definition at line 98 of file library_manager.cpp.

References BOOLEAN, STR, THROW_ERROR, and value_type.

Referenced by xwrite().

Here is the caller graph for this function:

◆ has_list()

bool attribute::has_list ( ) const

Definition at line 129 of file library_manager.cpp.

References content_list.

Referenced by xwrite().

Here is the caller graph for this function:

◆ xload()

void attribute::xload ( const xml_element EnodeC,
std::vector< std::string > &  ordered_attributes,
std::map< std::string, attributeRef > &  attributes 
)
static

Definition at line 139 of file library_manager.cpp.

References attribute(), attribute_sequence::get_attribute(), xml_child::get_child_text(), xml_child::get_children(), xml_text_node::get_content(), and xml_attribute::get_value().

Referenced by get_content_list(), library_manager::xload(), and functional_unit::xload().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ xwrite()

void attribute::xwrite ( xml_element xml_node,
const std::string &  name 
)

Definition at line 173 of file library_manager.cpp.

References xml_child::add_child_element(), xml_child::add_child_text(), content_list, el, get_content_str(), get_value_type_str(), has_list(), and attribute_sequence::set_attribute().

Referenced by get_content_list().

Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ content

std::string attribute::content
private

Definition at line 76 of file library_manager.hpp.

Referenced by attribute(), get_content(), and get_content_str().

◆ content_list

std::vector<attributeRef> attribute::content_list
private

Definition at line 80 of file library_manager.hpp.

Referenced by attribute(), get_content_list(), has_list(), and xwrite().

◆ value_type

value_t attribute::value_type {FLOAT64}
private

Definition at line 78 of file library_manager.hpp.

Referenced by attribute(), get_value_type(), and get_value_type_str().


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

Generated on Mon Feb 12 2024 13:03:44 for PandA-2024.02 by doxygen 1.8.13