ug4
|
a struct that holds information associated with subsets. More...
#include <subset_handler_interface.h>
Public Types | |
typedef std::map< std::string, Variant > | PropertyMap |
Public Member Functions | |
SubsetInfo () | |
void | set_property (const char *name, Variant prop) |
associate a property with the given name More... | |
void | set_property (const std::string &name, Variant prop) |
associate a property with the given name More... | |
Variant | get_property (const char *name, Variant defaultValue=Variant()) const |
retrieve the property with the given name More... | |
Variant | get_property (const std::string &name, Variant defaultValue=Variant()) const |
retrieve the property with the given name More... | |
Public Attributes | |
vector4 | color |
PropertyMap | m_propertyMap |
custom properties can be stored in this map. More... | |
int | materialIndex |
mostly ignored. More... | |
std::string | name |
uint | subsetState |
an or-combination of SubsetState flags. More... | |
a struct that holds information associated with subsets.
The subset info can be used to store additional information with each subset. On the one hand it features some often used entries like name and color, on the other hand it features a property system, which allows to associate custom properties with each subset. Note that the property system isn't that fast, that it should be frequently used in performance critical sections of the code.
typedef std::map<std::string, Variant> ug::SubsetInfo::PropertyMap |
ug::SubsetInfo::SubsetInfo | ( | ) |
References name, and ug::SS_NONE.
retrieve the property with the given name
You may optionally specify a default value, which will be returned if the entry is not found.
References name.
Referenced by ug::DimensionOfSubset().
Variant ug::SubsetInfo::get_property | ( | const std::string & | name, |
Variant | defaultValue = Variant() |
||
) | const |
retrieve the property with the given name
You may optionally specify a default value, which will be returned if the entry is not found.
References name.
void ug::SubsetInfo::set_property | ( | const char * | name, |
Variant | prop | ||
) |
associate a property with the given name
References name.
void ug::SubsetInfo::set_property | ( | const std::string & | name, |
Variant | prop | ||
) |
associate a property with the given name
References name.
vector4 ug::SubsetInfo::color |
Referenced by ug::GridWriterUGX::add_subset_attributes(), ug::AssignDefaultSubsetColors(), ug::AssignSubsetColorsBlueToGreen(), ug::AssignSubsetColorsRedToGreen(), ug::DeserializeSubsetHandler(), ug::ISubsetHandler::ISubsetHandler(), ug::SubsetHandlerSerializer::read_info(), ug::SerializeSubsetHandler(), ug::GridReaderUGX::subset_handler(), and ug::SubsetHandlerSerializer::write_info().
PropertyMap ug::SubsetInfo::m_propertyMap |
custom properties can be stored in this map.
One should access it through set_property and get_property.
Referenced by ug::DeserializeSubsetHandler(), ug::SubsetHandlerSerializer::read_info(), ug::SerializeSubsetHandler(), and ug::SubsetHandlerSerializer::write_info().
int ug::SubsetInfo::materialIndex |
mostly ignored.
Referenced by ug::DeserializeSubsetHandler(), ug::ISubsetHandler::ISubsetHandler(), ug::LoadGridFromOBJ(), ug::SaveGridToOBJ(), and ug::SerializeSubsetHandler().
std::string ug::SubsetInfo::name |
Referenced by ug::GridWriterUGX::add_subset_attributes(), ug::AssignSubsetsByElementType(), ug::AssignSubsetsByInterfaceType(), ug::AssignSubsetsByLevel(), ug::AssignSubsetsBySurfaceViewState(), ug::DeserializeSubsetHandler(), ug::GridWriterVTU::end_cell_data(), ug::ExportGridToUG_2D(), ug::ISubsetHandler::get_subset_index(), ug::ISubsetHandler::ISubsetHandler(), ug::LoadGridFromOBJ(), ug::SubsetHandlerSerializer::read_info(), ug::DelaunayDebugSaver::save(), ug::GlobalFracturedMediaRefiner::save_marks_to_file(), ug::GlobalMultiGridRefiner::save_marks_to_file(), ug::HangingNodeRefinerBase< TSelector >::save_marks_to_file(), ug::SaveCoarsenMarksToFile(), ug::SaveGridToOBJ(), ug::SeparateRegions(), ug::SerializeSubsetHandler(), ug::ISubsetHandler::set_subset_name(), ug::GridReaderVTU::subset_handler(), ug::GridReaderUGX::subset_handler(), ug::SubsetHandlerSerializer::write_info(), and ug::WriteLGM().
uint ug::SubsetInfo::subsetState |
an or-combination of SubsetState flags.
Referenced by ug::GridWriterUGX::add_subset_attributes(), ug::DeserializeSubsetHandler(), ug::ISubsetHandler::ISubsetHandler(), ug::SerializeSubsetHandler(), and ug::GridReaderUGX::subset_handler().