XJ music engine
1.9.6
In-game runtime engine for XJ music.
|
#include <MemeTaxonomy.h>
Public Member Functions | |
MemeCategory ()=default | |
MemeCategory (const std::string *raw) | |
MemeCategory (const MapStringToOneOrManyString &data) | |
std::string | getName () const |
std::set< std::string > | getMemes () const |
bool | isAllowed (std::set< std::string > &targets) const |
bool | hasMemes () const |
MapStringToOneOrManyString | toMap () const |
std::string | toString () const |
Friends | |
bool | operator< (const MemeCategory &lhs, const MemeCategory &rhs) |
One category of memes in the taxonomy
|
default |
|
explicit |
Construct a category from a raw string like "CATEGORY[MEME1, MEME2]"
raw | The raw string |
|
explicit |
Construct a category from a map like {name: "CATEGORY", memes: ["MEME1", "MEME2"]}
data | The map |
std::set< std::string > MemeCategory::getMemes | ( | ) | const |
Get the list of memes
std::string MemeCategory::getName | ( | ) | const |
Get the name of the category
bool MemeCategory::hasMemes | ( | ) | const |
Whether the category has memes
bool MemeCategory::isAllowed | ( | std::set< std::string > & | targets | ) | const |
Whether a list of memes is allowed because no more than one matches the category's memes
targets | The list of memes to check |
MapStringToOneOrManyString MemeCategory::toMap | ( | ) | const |
Convert the category to a map like {name: "CATEGORY", memes: ["MEME1", "MEME2"]}
std::string MemeCategory::toString | ( | ) | const |
Convert the category to a string like "CATEGORY[MEME1, MEME2]"
|
friend |
Compare two categories by name
lhs | The left-hand side category |
rhs | The right-hand side category |