BT-MatML-Editor 0.1.4
Editor for the MatML 3.1 XML Schema
Public Member Functions | Static Public Member Functions | List of all members
bellshire::Utilities Class Reference

More...

#include <BT_MatML_Utilities_GUI.h>

Inheritance diagram for bellshire::Utilities:
bellshire::MatML_Base_GUI bellshire::MaterialFrame bellshire::Abbreviation_GUI_Base bellshire::Associate_GUI_Base bellshire::AssociationDetails_GUI_Base bellshire::AuthorityDetails_GUI_Base bellshire::BulkDetails_GUI_Base bellshire::Characterization_GUI_Base bellshire::ChemicalComposition_GUI_Base bellshire::ChemicalElementSymbol_GUI_Base bellshire::Class_GUI_Base bellshire::ComponentDetails_GUI_Base bellshire::Compound_GUI_Base bellshire::Concentration_GUI_Base bellshire::CurrencyCode_GUI_Base bellshire::Data1_GUI_Base bellshire::DataSourceDetails_GUI_Base bellshire::Data_GUI_Base bellshire::Definition_GUI_Base bellshire::DimensionalDetails_GUI_Base bellshire::Dimensions_GUI_Base bellshire::Element_GUI_Base bellshire::Form_GUI_Base bellshire::Formula_GUI_Base bellshire::Geometry_GUI_Base bellshire::GlossaryTerm_GUI_Base bellshire::Glossary_GUI_Base bellshire::Graph_GUI_Base bellshire::Graphs_GUI_Base bellshire::Intro_GUI_Base bellshire::MatML_Doc_GUI_Base bellshire::Material_GUI_Base bellshire::MeasurementTechniqueDetails_GUI_Base bellshire::Metadata_GUI_Base bellshire::Name_GUI_Base bellshire::Notes_GUI_Base bellshire::Orientation_GUI_Base bellshire::ParameterDetails_GUI_Base bellshire::ParameterValue_GUI_Base bellshire::ParentMaterial_GUI_Base bellshire::ParentSubClass_GUI_Base bellshire::PhaseComposition_GUI_Base bellshire::ProcessingDetails_GUI_Base bellshire::PropertyData_GUI_Base bellshire::PropertyDetails_GUI_Base bellshire::Qualifier_GUI_Base bellshire::Relationship_GUI_Base bellshire::Result_GUI_Base bellshire::Scale_GUI_Base bellshire::Shape_GUI_Base bellshire::SourceDetails_GUI_Base bellshire::Source_GUI_Base bellshire::Specification_GUI_Base bellshire::SpecimenDetails_GUI_Base bellshire::Subclass1_GUI_Base bellshire::Subclass_GUI_Base bellshire::Symbol_GUI_Base bellshire::Synonym_GUI_Base bellshire::TestConditionDetails_GUI_Base bellshire::Uncertainty_GUI_Base bellshire::Unit_GUI_Base bellshire::Unitless_GUI_Base bellshire::Units_GUI_Base bellshire::Value_GUI_Base

Public Member Functions

void CollectBranchMaterials (boost::shared_ptr< MatML_Doc > doc, Material *m, std::vector< Material * > &ms)
 Collect Branch of Materials More...
 
void CollectBranchMaterialsBackwards (Material *m, std::vector< Material * > &ms)
 Collect Branch of Materials in the Backwards direction More...
 
void CollectBranchMaterialsForewards (boost::shared_ptr< MatML_Doc > doc, Material *m, std::vector< Material * > &ms)
 Collect Branch of Materials in the Forwards direction More...
 

Static Public Member Functions

static wxTreeItemId MatMLtoTreeCtrl (TreeCtrlSorted *MatMLTreeCtrl, Material *MatMLMaterial)
 Searches the TreeCtrl to find the MatML Element More...
 
static std::list< std::pair< Material *, xml_schema::string > > GetMaterialIDPair (::boost::shared_ptr< MatML_Doc > MatMLDoc, std::list< xml_schema::string > ClassFilters=std::list< xml_schema::string >())
 Gather Material* and Material->ID paired together in a list. More...
 
static bool InFilter (Material *material, std::list< xml_schema::string > Filter)
 Determines if the Material has a Class->Name for each of the ClassFilter strings If the filter is empty then the default is true. More...
 
static bool InFilter (Material *material, xml_schema::string *Filter)
 Determines if the Material has a Class->Name that matches the ClassFilter string More...
 
static std::list< Name * > GetMatMLDocClassNames (::boost::shared_ptr< MatML_Doc > MatMLDoc)
 Gathers within the MatMLDoc all of the materials->BulkDetails->Class->Name More...
 
static std::list< Name * > GetBulkDetailsClassNames (Material *material)
 Get the Materials BulkDetails->Class->Names More...
 
static bool CompareName (Name *&first, Name *&second)
 Comparision of the First Name to the Second Name More...
 
static bool SameName (Name *&first, Name *&second)
 Compare if the First Name and Second Name are the same a binary predicate implemented as a function More...
 
::std::string Label (::std::string name, ::std::string id)
 Creates a string of the Labels used in wxWidgets displays More...
 
::std::string LabelToId (::std::string label)
 
static std::list< xml_schema::string > wx2std (const wxArrayString &wxstr)
 Converts wxArrayString to std::list of xml_schema::string More...
 
static wxArrayString std2wx (const std::list< xml_schema::string > &stdstr)
 Converts list of xml_schema::string to wxArrayString More...
 

Detailed Description

Utility Functions

Member Function Documentation

◆ CollectBranchMaterials()

void Utilities::CollectBranchMaterials ( boost::shared_ptr< MatML_Doc doc,
Material m,
std::vector< Material * > &  ms 
)

Collect Branch of Materials

Parameters
m
ms

◆ CollectBranchMaterialsBackwards()

void Utilities::CollectBranchMaterialsBackwards ( Material m,
std::vector< Material * > &  ms 
)

Collect Branch of Materials in the Backwards direction

Parameters
m
ms

◆ CollectBranchMaterialsForewards()

void Utilities::CollectBranchMaterialsForewards ( boost::shared_ptr< MatML_Doc doc,
Material m,
std::vector< Material * > &  ms 
)

Collect Branch of Materials in the Forwards direction

Parameters
m
ms

◆ CompareName()

bool Utilities::CompareName ( Name *&  first,
Name *&  second 
)
static

Comparision of the First Name to the Second Name

Parameters
first
second
Returns

◆ GetBulkDetailsClassNames()

std::list< Name * > Utilities::GetBulkDetailsClassNames ( Material material)
static

Get the Materials BulkDetails->Class->Names

Parameters
material
Returns

◆ GetMaterialIDPair()

std::list< std::pair< Material *, xml_schema::string > > Utilities::GetMaterialIDPair ( ::boost::shared_ptr< MatML_Doc MatMLDoc,
std::list< xml_schema::string >  ClassFilters = std::list<xml_schema::string>() 
)
static

Gather Material* and Material->ID paired together in a list.

Parameters
MatMLDoc
ClassFilters
Returns
MaterialIDPair

◆ GetMatMLDocClassNames()

std::list< Name * > Utilities::GetMatMLDocClassNames ( ::boost::shared_ptr< MatML_Doc MatMLDoc)
static

Gathers within the MatMLDoc all of the materials->BulkDetails->Class->Name

Parameters
MatMLDoc
Returns

◆ InFilter() [1/2]

bool Utilities::InFilter ( Material material,
std::list< xml_schema::string >  Filter 
)
static

Determines if the Material has a Class->Name for each of the ClassFilter strings If the filter is empty then the default is true.

Parameters
material
ClassFilters
Returns

◆ InFilter() [2/2]

bool Utilities::InFilter ( Material material,
xml_schema::string *  Filter 
)
static

Determines if the Material has a Class->Name that matches the ClassFilter string

Parameters
material
ClassFilter
Returns

◆ Label()

std::string Utilities::Label ( ::std::string  name,
::std::string  id 
)
static

Creates a string of the Labels used in wxWidgets displays

summary> Takes the Label, used in wxWidgets displays, and pulls out the Id

◆ MatMLtoTreeCtrl()

wxTreeItemId Utilities::MatMLtoTreeCtrl ( TreeCtrlSorted MatMLTreeCtrl,
Material material 
)
static

Searches the TreeCtrl to find the MatML Element

Find the associated TreeCtrl

Parameters
MatMLTreeCtrl
material
Returns
Matching TreeCtrlId

◆ SameName()

bool Utilities::SameName ( Name *&  first,
Name *&  second 
)
static

Compare if the First Name and Second Name are the same a binary predicate implemented as a function

Parameters
first
second
Returns

◆ std2wx()

wxArrayString Utilities::std2wx ( const std::list< xml_schema::string > &  stdstr)
static

Converts list of xml_schema::string to wxArrayString

Parameters
stdstr
Returns

◆ wx2std()

std::list< xml_schema::string > Utilities::wx2std ( const wxArrayString &  wxstr)
static

Converts wxArrayString to std::list of xml_schema::string

Parameters
wxstr
Returns

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