SOFA API  6a688117
Open source framework for multi-physics simuation
sofa::core::visual::FlagTreeItem Class Reference

#include <DisplayFlags.h>

Classes

struct  ci_comparison
 

Protected Attributes

sofa::helper::vector< std::string > m_showName
 
sofa::helper::vector< std::string > m_hideName
 
tristate m_state
 
FlagTreeItemm_parent
 
sofa::helper::vector< FlagTreeItem * > m_child
 

Public Member Functions

 FlagTreeItem (const std::string &showName, const std::string &hideName, FlagTreeItem *parent=nullptr)
 
const tristatestate () const
 
tristatestate ()
 
std::ostream & write (std::ostream &os) const
 
std::istream & read (std::istream &in)
 
void setValue (const tristate &state)
 
void addAliasShow (const std::string &newAlias)
 
void addAliasHide (const std::string &newAlias)
 
void addAlias (sofa::helper::vector< std::string > &name, const std::string &newAlias)
 

Protected Member Functions

void propagateStateDown (FlagTreeItem *origin)
 
void propagateStateUp (FlagTreeItem *origin)
 

Static Protected Member Functions

static std::map< std::string, bool, ci_comparisoncreate_flagmap (FlagTreeItem *root)
 
static void create_parse_map (FlagTreeItem *root, std::map< std::string, bool, ci_comparison > &map)
 
static void read_recursive (FlagTreeItem *root, const std::map< std::string, bool, ci_comparison > &map)
 
static void write_recursive (const FlagTreeItem *root, std::string &str)
 

Friends

std::ostream & operator<< (std::ostream &os, const FlagTreeItem &root)
 
std::istream & operator>> (std::istream &in, FlagTreeItem &root)
 

Attribute details

sofa::helper::vector<FlagTreeItem*> sofa::core::visual::FlagTreeItem::m_child
protected
sofa::helper::vector<std::string> sofa::core::visual::FlagTreeItem::m_hideName
protected
FlagTreeItem* sofa::core::visual::FlagTreeItem::m_parent
protected
sofa::helper::vector<std::string> sofa::core::visual::FlagTreeItem::m_showName
protected
tristate sofa::core::visual::FlagTreeItem::m_state
protected

Constructor details

sofa::core::visual::FlagTreeItem::FlagTreeItem ( const std::string &  showName,
const std::string &  hideName,
FlagTreeItem parent = nullptr 
)

Function details

void sofa::core::visual::FlagTreeItem::addAlias ( sofa::helper::vector< std::string > &  name,
const std::string &  newAlias 
)
void sofa::core::visual::FlagTreeItem::addAliasHide ( const std::string &  newAlias)
void sofa::core::visual::FlagTreeItem::addAliasShow ( const std::string &  newAlias)
static std::map<std::string,bool, ci_comparison> sofa::core::visual::FlagTreeItem::create_flagmap ( FlagTreeItem root)
staticprotected
void sofa::core::visual::FlagTreeItem::create_parse_map ( FlagTreeItem root,
std::map< std::string, bool, ci_comparison > &  map 
)
staticprotected
void sofa::core::visual::FlagTreeItem::propagateStateDown ( FlagTreeItem origin)
protected
void sofa::core::visual::FlagTreeItem::propagateStateUp ( FlagTreeItem origin)
protected
std::istream & sofa::core::visual::FlagTreeItem::read ( std::istream &  in)
void sofa::core::visual::FlagTreeItem::read_recursive ( FlagTreeItem root,
const std::map< std::string, bool, ci_comparison > &  map 
)
staticprotected
void sofa::core::visual::FlagTreeItem::setValue ( const tristate state)
const tristate& sofa::core::visual::FlagTreeItem::state ( ) const
inline
tristate& sofa::core::visual::FlagTreeItem::state ( )
inline
std::ostream & sofa::core::visual::FlagTreeItem::write ( std::ostream &  os) const
void sofa::core::visual::FlagTreeItem::write_recursive ( const FlagTreeItem root,
std::string &  str 
)
staticprotected

Related details

std::ostream& operator<< ( std::ostream &  os,
const FlagTreeItem root 
)
friend
std::istream& operator>> ( std::istream &  in,
FlagTreeItem root 
)
friend