Skip to content
Snippets Groups Projects
Commit a025de77 authored by Joan Solà Ortega's avatar Joan Solà Ortega
Browse files

Add access by char

parent 5f5803ce
No related branches found
No related tags found
1 merge request!323Resolve "New data structure for storing stateblocks"
This commit is part of merge request !323. Comments created here will be created in the context of that merge request.
......@@ -44,13 +44,22 @@ class HasStateBlocks
void unfix();
bool isFixed() const;
protected:
public:
StateBlockPtr setStateBlock(const std::string& _sb_type, const StateBlockPtr& _sb);
StateBlockPtr setStateBlock(const char& _sb_type, const StateBlockPtr& _sb)
{
return setStateBlock(std::string(1,_sb_type), _sb);
}
StateBlockPtr getStateBlock(const std::string& _sb_type) const;
StateBlockPtr getStateBlock(const char& _sb_type) const {return getStateBlock(std::string(1,_sb_type));}
unsigned int removeStateBlock(const std::string& _sb_type)
{
return state_block_map_.erase(_sb_type);
}
unsigned int removeStateBlock(const char& _sb_type)
{
return removeStateBlock(std::string(1,_sb_type));
}
// Emplace derived state blocks (angle, quaternion, etc).
template<typename SB, typename ... Args>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment