SpiecsEngine
 
Loading...
Searching...
No Matches

◆ RemoveTag()

void Spices::TagComponent::RemoveTag ( const std::string & tag)

Remove a tag from this component handled.

Parameters
[in]tagThe string type.

Definition at line 27 of file TagComponent.cpp.

28 {
30
31 assert(m_Tags.size() > 0);
32
33 if (m_Tags.size() == 1)
34 {
35 std::stringstream ss;
36 ss << "Remove tag failed: Entity " << *m_Tags.begin() << " must have at lease one tag.";
37
38 SPICES_CORE_WARN(ss.str())
39
40 return;
41 }
42
43 if (m_Tags.find(tag) == m_Tags.end())
44 {
45 std::stringstream ss;
46 ss << "Remove tag failed: Entity " << *m_Tags.begin() << " do not have tag of " << tag;
47
48 SPICES_CORE_WARN(ss.str())
49
50 return;
51 }
52
53 m_Tags.erase(tag);
54 }
#define SPICES_PROFILE_ZONE
std::set< std::string > m_Tags
The tags this component handled.