16 #include <sbml/packages/render/sbml/Style.h>
40 mRoleList(source.mRoleList),
41 mTypeList(source.mTypeList),
57 mpGroup(new
CLGroup(*source.getGroup(), this)),
170 std::string delimiter =
"\n\r\t ";
171 std::size_t lastPos = s.find_first_not_of(delimiter);
174 while (lastPos != std::string::npos)
176 pos = s.find_first_of(delimiter, lastPos);
177 set.insert(s.substr(lastPos, pos - lastPos));
178 lastPos = s.find_first_not_of(delimiter, pos);
184 std::ostringstream os;
185 std::set<std::string>::const_iterator it = set.begin(), endit = set.end();
193 if (!os.str().empty())
195 os.str(os.str().substr(0, os.str().size() - 1));
239 RenderGroup* pG = this->
mpGroup->
toSBML(pStyle->getLevel(), pStyle->getVersion());
240 pStyle->setGroup(pG);
242 std::set<std::string> s;
244 pStyle->setRoleList(s);
247 pStyle->setTypeList(s);
size_t getNumTypes() const
bool remove(const std::string &key)
void removeType(const std::string &type)
void removeRole(const std::string &role)
void setGroup(const CLGroup *pGroup)
void addRole(const std::string &role)
static void readIntoSet(const std::string &s, std::set< std::string > &set)
void addType(const std::string &type)
const std::set< std::string > & getRoleList() const
size_t getNumRoles() const
const std::set< std::string > & getTypeList() const
std::set< std::string > mTypeList
const CLGroup * getGroup() const
void addSBMLAttributes(Style *pStyle) const
void setTypeList(const std::set< std::string > &typeList)
const std::string & getKey() const
static CKeyFactory * getKeyFactory()
CLStyle(const std::string &name, CCopasiContainer *pParent=NULL)
bool isInTypeList(const std::string &type) const
static std::string createStringFromSet(const std::set< std::string > &set)
bool isInRoleList(const std::string &role) const
std::set< std::string > mRoleList
void setRoleList(const std::set< std::string > &roleList)
RenderGroup * toSBML(unsigned int level, unsigned int version) const