TargetList Class¶
Header: #include "easyar/target.hpp"
Inherits: RefBase
Description¶
TargetList is a list of Target.
Public Functions¶
TargetList()
virtual ~TargetList()
bool load(const char* path, int storageType) (until 1.2.1)
int size() const
Target operator [](int idx)
Target at(int idx)
bool insert(const Target& target)
bool erase(const Target& target)
TargetList()¶
Creates a TargetList object.
virtual ~TargetList()¶
Destroys the TargetList object.
bool load(const char* path, int storageType) (until 1.2.1)¶
Loads all targets listed in the json file or json string from path with storageType . See Target::load and StorageType for more descriptions of storageType and json file.
int size() const¶
Returns the size of the list.
Target operator [](int idx)¶
Returns the Target of index idx . If idx is out of the list index range, an empty (invalid) Target will be returned.
Target at(int idx)¶
Returns the Target of index idx . If idx is out of the list index range, an empty (invalid) Target will be returned.
bool insert(const Target& target)¶
Insert a Target into the list. Returns true if the operation succeeds.
bool erase(const Target& target)¶
Erase the Target from the list. Returns true if the operation succeeds.