36 #include <lifev/core/LifeV.hpp> 37 #include <lifev/core/util/Switch.hpp> 63 std::string temp ( a );
85 std::string temp ( a );
86 return unset ( temp );
100 i->second = ! ( i->second );
107 std::string temp ( a );
108 return toggle ( temp );
117 insert ( std::make_pair ( a, status ) );
128 std::string temp ( a );
129 create ( temp, status );
138 return std::make_pair (
false,
false );
143 return std::make_pair (
true, i->second );
149 std::string temp ( a );
150 return status ( temp );
170 std::string temp ( a );
171 return test ( temp );
178 out << std::endl <<
" Status of switches" << std::endl;
179 for ( iteratorConst_Type i = begin(); i != end(); ++i )
181 out <<
"Switch named: " << i->first <<
" Value= " << i->second << std::endl;
I use standard constructor/destructors.
bool toggle(std::string const &a)
It toggles the switch Returns true if the switch s existed.
std::ostream & showMe(bool verbose=false, std::ostream &out=std::cout) const
std::pair< bool, bool > status(std::string const &a) const
void updateInverseJacobian(const UInt &iQuadPt)
void create(const char *a, bool status=false)
void create(std::string const &a, bool status=false)
Creates a switch (default is OFF) It sets the switch if it is there.
bool unset(std::string const &a)
It unsets the switch.
std::pair< bool, bool > status(const char *a) const
bool set(std::string const &a)
It sets the switch It does NOT create a new switch (use create); Returns true if the switch s existed...
bool test(std::string const &a) const
bool unset(const char *a)
std::map< std::string, bool >::const_iterator iteratorConst_Type
bool toggle(const char *a)
std::map< std::string, bool >::iterator iterator_Type
bool test(const char *a) const