Norbert's Game Engine v200
Loading...
Searching...
No Matches
eTags Class Reference

#include <Tags.hpp>

Inheritance diagram for eTags:
eBase

Public Member Functions

void Push (eString tag)
 
void Pop (eString tag)
 
void Popa ()
 
bool Has (eString tag)
 
std::vector< eString > & GetCollection ()
 
- Public Member Functions inherited from eBase
template<typename T >
T * Cast (eBase *obj)
 Cast class to base.
 

Detailed Description

Class for managing doer tags

Definition at line 13 of file Tags.hpp.

Member Function Documentation

◆ GetCollection()

std::vector< eString > & eTags::GetCollection ( )

Definition at line 42 of file Tags.cpp.

43{
44 return mItems;
45}

◆ Has()

bool eTags::Has ( eString tag)

Definition at line 32 of file Tags.cpp.

33{
34 for (auto& it : mItems)
35 {
36 if (it == tag)
37 return true;
38 }
39 return false;
40}

◆ Pop()

void eTags::Pop ( eString tag)

Definition at line 14 of file Tags.cpp.

15{
16 for (uint i = 0; i < mItems.size(); i++)
17 {
18 if (mItems[i] == tag)
19 {
20 mItems.erase(mItems.begin() + i);
21 return;
22 }
23 }
24 eConsole::PrintLog("WARNING::eTags::Pop", "Tag does not exists!");
25}
static void PrintLog(eString head, eString msg)
Print a log.
Definition Console.cpp:22

◆ Popa()

void eTags::Popa ( )

Definition at line 27 of file Tags.cpp.

28{
29 mItems.clear();
30}

◆ Push()

void eTags::Push ( eString tag)

Definition at line 7 of file Tags.cpp.

8{
9 if (Has(tag))
10 eConsole::PrintLog("INFO::eTags::Push", "Tag already exists!");
11 else mItems.push_back(tag);
12}

The documentation for this class was generated from the following files: