Refureku v2.2.0
C++17 runtime reflection library.
|
Public Member Functions | |
Database (Database const &)=delete | |
Database (Database &&)=delete | |
RFK_NODISCARD REFUREKU_API Entity const * | getEntityById (std::size_t id) const noexcept |
Retrieve an entity by id. More... | |
RFK_NODISCARD REFUREKU_API Namespace const * | getNamespaceById (std::size_t id) const noexcept |
Retrieve a namespace by id. More... | |
RFK_NODISCARD REFUREKU_API Namespace const * | getNamespaceByName (char const *name) const |
Retrieve a namespace by name. Can search nested namespaces directly using :: separator. Example: getNamespace("namespace1::namespace2") will get the namespace2 nested inside namespace1 if it exists. More... | |
RFK_NODISCARD REFUREKU_API Namespace const * | getFileLevelNamespaceByPredicate (Predicate< Namespace > predicate, void *userData) const |
Retrieve the first file level namespace satisfying the provided predicate. More... | |
RFK_NODISCARD REFUREKU_API Vector< Namespace const * > | getFileLevelNamespacesByPredicate (Predicate< Namespace > predicate, void *userData) const |
Retrieve all file level namespaces satisfying the provided predicate. More... | |
REFUREKU_API bool | foreachFileLevelNamespace (Visitor< Namespace > visitor, void *userData) const |
Execute the given visitor on all file level namespaces. More... | |
REFUREKU_API std::size_t | getFileLevelNamespacesCount () const noexcept |
Get the number of reflected file level namespaces in the database. More... | |
RFK_NODISCARD REFUREKU_API Archetype const * | getArchetypeById (std::size_t id) const noexcept |
Retrieve an archetype by id. More... | |
RFK_NODISCARD REFUREKU_API Archetype const * | getFileLevelArchetypeByName (char const *name) const noexcept |
Retrieve a file level archetype by name. This method costs heavier performance as it will basically call getClassByName, getStructByName, getEnumByName and then getFundamentalArchetypeByName to find the queried archetype. More... | |
RFK_NODISCARD REFUREKU_API Vector< Archetype const * > | getFileLevelArchetypesByPredicate (Predicate< Archetype > predicate, void *userData) const |
Retrieve all file level archetypes satisfying the provided predicate. More... | |
RFK_NODISCARD REFUREKU_API Struct const * | getStructById (std::size_t id) const noexcept |
Retrieve a struct by id. More... | |
RFK_NODISCARD REFUREKU_API Struct const * | getFileLevelStructByName (char const *name) const noexcept |
Retrieve a file level struct by name. More... | |
RFK_NODISCARD REFUREKU_API Struct const * | getFileLevelStructByPredicate (Predicate< Struct > predicate, void *userData) const |
Retrieve the first level struct satisfying the provided predicate. More... | |
RFK_NODISCARD REFUREKU_API Vector< Struct const * > | getFileLevelStructsByPredicate (Predicate< Struct > predicate, void *userData) const |
Retrieve all file level structs satisfying the provided predicate. More... | |
REFUREKU_API bool | foreachFileLevelStruct (Visitor< Struct > visitor, void *userData) const |
Execute the given visitor on all file level structs. More... | |
REFUREKU_API std::size_t | getFileLevelStructsCount () const noexcept |
Get the number of reflected file level structs in the database. More... | |
RFK_NODISCARD REFUREKU_API Class const * | getClassById (std::size_t id) const noexcept |
Retrieve a class by id. More... | |
RFK_NODISCARD REFUREKU_API Class const * | getFileLevelClassByName (char const *name) const noexcept |
Retrieve a file level class by name. More... | |
RFK_NODISCARD REFUREKU_API Class const * | getFileLevelClassByPredicate (Predicate< Class > predicate, void *userData) const |
Retrieve the first level struct satisfying the provided predicate. More... | |
RFK_NODISCARD REFUREKU_API Vector< Class const * > | getFileLevelClassesByPredicate (Predicate< Class > predicate, void *userData) const |
Retrieve all file level classes satisfying the provided predicate. More... | |
REFUREKU_API bool | foreachFileLevelClass (Visitor< Class > visitor, void *userData) const |
Execute the given visitor on all file level classes. More... | |
REFUREKU_API std::size_t | getFileLevelClassesCount () const noexcept |
Get the number of reflected file level classes in the database. More... | |
RFK_NODISCARD REFUREKU_API Enum const * | getEnumById (std::size_t id) const noexcept |
Retrieve an enum by id. More... | |
RFK_NODISCARD REFUREKU_API Enum const * | getFileLevelEnumByName (char const *name) const noexcept |
Retrieve a file level enum by name. More... | |
RFK_NODISCARD REFUREKU_API Enum const * | getFileLevelEnumByPredicate (Predicate< Enum > predicate, void *userData) const |
Retrieve the first file level enum satisfying the provided predicate. More... | |
RFK_NODISCARD REFUREKU_API Vector< Enum const * > | getFileLevelEnumsByPredicate (Predicate< Enum > predicate, void *userData) const |
Retrieve all file level enums satisfying the provided predicate. More... | |
REFUREKU_API bool | foreachFileLevelEnum (Visitor< Enum > visitor, void *userData) const |
Execute the given visitor on all file level enums. More... | |
REFUREKU_API std::size_t | getFileLevelEnumsCount () const noexcept |
Get the number of reflected file level classes in the database. More... | |
RFK_NODISCARD REFUREKU_API FundamentalArchetype const * | getFundamentalArchetypeById (std::size_t id) const noexcept |
Retrieve a fundamental archetype by id. More... | |
RFK_NODISCARD REFUREKU_API FundamentalArchetype const * | getFundamentalArchetypeByName (char const *name) const noexcept |
Retrieve a fundamental archetype by name. More... | |
RFK_NODISCARD REFUREKU_API Variable const * | getVariableById (std::size_t id) const noexcept |
Retrieve a variable by id. More... | |
RFK_NODISCARD REFUREKU_API Variable const * | getFileLevelVariableByName (char const *name, EVarFlags flags=EVarFlags::Default) const noexcept |
Retrieve a file level (non-member) variable by name. More... | |
RFK_NODISCARD REFUREKU_API Variable const * | getFileLevelVariableByPredicate (Predicate< Variable > predicate, void *userData) const |
Retrieve the first file level variable satisfying the provided predicate. More... | |
RFK_NODISCARD REFUREKU_API Vector< Variable const * > | getFileLevelVariablesByPredicate (Predicate< Variable > predicate, void *userData) const |
Retrieve all file level variables satisfying the provided predicate. More... | |
REFUREKU_API bool | foreachFileLevelVariable (Visitor< Variable > visitor, void *userData) const |
Execute the given visitor on all file level variables. More... | |
REFUREKU_API std::size_t | getFileLevelVariablesCount () const noexcept |
Get the number of reflected file level variables in the database. More... | |
RFK_NODISCARD REFUREKU_API Function const * | getFunctionById (std::size_t id) const noexcept |
Retrieve a function by id. More... | |
template<typename FunctionSignature > | |
RFK_NODISCARD Function const * | getFileLevelFunctionByName (char const *name, EFunctionFlags flags=EFunctionFlags::Default) const noexcept |
Retrieve a file level function by name and signature. More... | |
RFK_NODISCARD REFUREKU_API Function const * | getFileLevelFunctionByName (char const *name, EFunctionFlags flags=EFunctionFlags::Default) const noexcept |
Retrieve a file level function by name. More... | |
RFK_NODISCARD REFUREKU_API Vector< Function const * > | getFileLevelFunctionsByName (char const *name, EFunctionFlags flags=EFunctionFlags::Default) const noexcept |
Retrieve all file level functions by name. More... | |
RFK_NODISCARD REFUREKU_API Function const * | getFileLevelFunctionByPredicate (Predicate< Function > predicate, void *userData) const |
Retrieve the first file level function satisfying the provided predicate. More... | |
RFK_NODISCARD REFUREKU_API Vector< Function const * > | getFileLevelFunctionsByPredicate (Predicate< Function > predicate, void *userData) const |
Retrieve all file level functions satisfying the provided predicate. More... | |
REFUREKU_API bool | foreachFileLevelFunction (Visitor< Function > visitor, void *userData) const |
Execute the given visitor on all file level functions. More... | |
REFUREKU_API std::size_t | getFileLevelFunctionsCount () const noexcept |
Get the number of reflected file level functions in the database. More... | |
RFK_NODISCARD REFUREKU_API Method const * | getMethodById (std::size_t id) const noexcept |
Retrieve a method by id. More... | |
RFK_NODISCARD REFUREKU_API StaticMethod const * | getStaticMethodById (std::size_t id) const noexcept |
Retrieve a static method by id. More... | |
RFK_NODISCARD REFUREKU_API Field const * | getFieldById (std::size_t id) const noexcept |
Retrieve a field by id. More... | |
RFK_NODISCARD REFUREKU_API StaticField const * | getStaticFieldById (std::size_t id) const noexcept |
Retrieve a static field by id. More... | |
RFK_NODISCARD REFUREKU_API EnumValue const * | getEnumValueById (std::size_t id) const noexcept |
Retrieve an enum value by id. More... | |
Friends | |
REFUREKU_API Database const & | getDatabase () noexcept |
Get a reference to the database of this program. More... | |
REFUREKU_API bool rfk::Database::foreachFileLevelClass | ( | Visitor< Class > | visitor, |
void * | userData | ||
) | const |
Execute the given visitor on all file level classes.
visitor | Visitor function to call. Return false to abort the foreach loop. |
userData | Optional user data forwarded to the visitor. |
Any | exception potentially thrown from the provided visitor. |
REFUREKU_API bool rfk::Database::foreachFileLevelEnum | ( | Visitor< Enum > | visitor, |
void * | userData | ||
) | const |
Execute the given visitor on all file level enums.
visitor | Visitor function to call. Return false to abort the foreach loop. |
userData | Optional user data forwarded to the visitor. |
Any | exception potentially thrown from the provided visitor. |
REFUREKU_API bool rfk::Database::foreachFileLevelFunction | ( | Visitor< Function > | visitor, |
void * | userData | ||
) | const |
Execute the given visitor on all file level functions.
visitor | Visitor function to call. Return false to abort the foreach loop. |
userData | Optional user data forwarded to the visitor. |
Any | exception potentially thrown from the provided visitor. |
REFUREKU_API bool rfk::Database::foreachFileLevelNamespace | ( | Visitor< Namespace > | visitor, |
void * | userData | ||
) | const |
Execute the given visitor on all file level namespaces.
visitor | Visitor function to call. Return false to abort the foreach loop. |
userData | Optional user data forwarded to the visitor. |
Any | exception potentially thrown from the provided visitor. |
REFUREKU_API bool rfk::Database::foreachFileLevelStruct | ( | Visitor< Struct > | visitor, |
void * | userData | ||
) | const |
Execute the given visitor on all file level structs.
visitor | Visitor function to call. Return false to abort the foreach loop. |
userData | Optional user data forwarded to the visitor. |
Any | exception potentially thrown from the provided visitor. |
REFUREKU_API bool rfk::Database::foreachFileLevelVariable | ( | Visitor< Variable > | visitor, |
void * | userData | ||
) | const |
Execute the given visitor on all file level variables.
visitor | Visitor function to call. Return false to abort the foreach loop. |
userData | Optional user data forwarded to the visitor. |
Any | exception potentially thrown from the provided visitor. |
|
noexcept |
Retrieve an archetype by id.
id | The id of the archetype. |
|
noexcept |
Retrieve a class by id.
id | The id of the class. |
|
noexcept |
Retrieve an entity by id.
id | The id of the entity. |
|
noexcept |
Retrieve an enum by id.
id | The id of the enum. |
|
noexcept |
Retrieve an enum value by id.
id | The id of the enum value. |
|
noexcept |
Retrieve a field by id.
id | The id of the field. |
|
noexcept |
Retrieve a file level archetype by name. This method costs heavier performance as it will basically call getClassByName, getStructByName, getEnumByName and then getFundamentalArchetypeByName to find the queried archetype.
archetypeName | Name of the archetype. |
RFK_NODISCARD REFUREKU_API Vector< Archetype const * > rfk::Database::getFileLevelArchetypesByPredicate | ( | Predicate< Archetype > | predicate, |
void * | userData | ||
) | const |
Retrieve all file level archetypes satisfying the provided predicate.
predicate | Predicate defining a valid archetype. |
userData | User data forwarded to the predicate calls. |
Any | exception potentially thrown from the provided predicate. |
|
noexcept |
Retrieve a file level class by name.
name | The name of the class. |
RFK_NODISCARD REFUREKU_API Class const * rfk::Database::getFileLevelClassByPredicate | ( | Predicate< Class > | predicate, |
void * | userData | ||
) | const |
Retrieve the first level struct satisfying the provided predicate.
predicate | Predicate defining a valid struct. |
userData | User data forwarded to the predicate calls. |
Any | exception potentially thrown from the provided predicate. |
RFK_NODISCARD REFUREKU_API Vector< Class const * > rfk::Database::getFileLevelClassesByPredicate | ( | Predicate< Class > | predicate, |
void * | userData | ||
) | const |
Retrieve all file level classes satisfying the provided predicate.
predicate | Predicate defining a valid class. |
userData | User data forwarded to the predicate calls. |
Any | exception potentially thrown from the provided predicate. |
|
noexcept |
Get the number of reflected file level classes in the database.
|
noexcept |
Retrieve a file level enum by name.
name | The name of the enum. |
RFK_NODISCARD REFUREKU_API Enum const * rfk::Database::getFileLevelEnumByPredicate | ( | Predicate< Enum > | predicate, |
void * | userData | ||
) | const |
Retrieve the first file level enum satisfying the provided predicate.
predicate | Predicate defining a valid enum. |
userData | User data forwarded to the predicate calls. |
Any | exception potentially thrown from the provided predicate. |
RFK_NODISCARD REFUREKU_API Vector< Enum const * > rfk::Database::getFileLevelEnumsByPredicate | ( | Predicate< Enum > | predicate, |
void * | userData | ||
) | const |
Retrieve all file level enums satisfying the provided predicate.
predicate | Predicate defining a valid enum. |
userData | User data forwarded to the predicate calls. |
Any | exception potentially thrown from the provided predicate. |
|
noexcept |
Get the number of reflected file level classes in the database.
|
noexcept |
Retrieve a file level function by name and signature.
name | The name of the function. |
flags | Flags describing the queried function. The result function will have at least the provided flags. |
|
noexcept |
Retrieve a file level function by name.
name | The name of the function. |
flags | Flags describing the queried function. The result function will have at least the provided flags. |
RFK_NODISCARD REFUREKU_API Function const * rfk::Database::getFileLevelFunctionByPredicate | ( | Predicate< Function > | predicate, |
void * | userData | ||
) | const |
Retrieve the first file level function satisfying the provided predicate.
predicate | Predicate defining a valid function. |
userData | User data forwarded to the predicate calls. |
Any | exception potentially thrown from the provided predicate. |
|
noexcept |
Retrieve all file level functions by name.
name | The name of the function. |
flags | Flags describing the queried function. The result function will have at least the provided flags. |
RFK_NODISCARD REFUREKU_API Vector< Function const * > rfk::Database::getFileLevelFunctionsByPredicate | ( | Predicate< Function > | predicate, |
void * | userData | ||
) | const |
Retrieve all file level functions satisfying the provided predicate.
predicate | Predicate defining a valid function. |
userData | User data forwarded to the predicate calls. |
Any | exception potentially thrown from the provided predicate. |
|
noexcept |
Get the number of reflected file level functions in the database.
RFK_NODISCARD REFUREKU_API Namespace const * rfk::Database::getFileLevelNamespaceByPredicate | ( | Predicate< Namespace > | predicate, |
void * | userData | ||
) | const |
Retrieve the first file level namespace satisfying the provided predicate.
predicate | Predicate defining a valid namespace. |
userData | User data forwarded to the predicate calls. |
Any | exception potentially thrown from the provided predicate. |
RFK_NODISCARD REFUREKU_API Vector< Namespace const * > rfk::Database::getFileLevelNamespacesByPredicate | ( | Predicate< Namespace > | predicate, |
void * | userData | ||
) | const |
Retrieve all file level namespaces satisfying the provided predicate.
predicate | Predicate defining a valid namespace. |
userData | User data forwarded to the predicate calls. |
Any | exception potentially thrown from the provided predicate. |
|
noexcept |
Get the number of reflected file level namespaces in the database.
|
noexcept |
Retrieve a file level struct by name.
name | The name of the struct. |
RFK_NODISCARD REFUREKU_API Struct const * rfk::Database::getFileLevelStructByPredicate | ( | Predicate< Struct > | predicate, |
void * | userData | ||
) | const |
Retrieve the first level struct satisfying the provided predicate.
predicate | Predicate defining a valid struct. |
userData | User data forwarded to the predicate calls. |
Any | exception potentially thrown from the provided predicate. |
RFK_NODISCARD REFUREKU_API Vector< Struct const * > rfk::Database::getFileLevelStructsByPredicate | ( | Predicate< Struct > | predicate, |
void * | userData | ||
) | const |
Retrieve all file level structs satisfying the provided predicate.
predicate | Predicate defining a valid struct. |
userData | User data forwarded to the predicate calls. |
Any | exception potentially thrown from the provided predicate. |
|
noexcept |
Get the number of reflected file level structs in the database.
|
noexcept |
Retrieve a file level (non-member) variable by name.
name | The name of the variable. |
flags | Flags describing the queried variable. The result variable will have at least the provided flags. |
RFK_NODISCARD REFUREKU_API Variable const * rfk::Database::getFileLevelVariableByPredicate | ( | Predicate< Variable > | predicate, |
void * | userData | ||
) | const |
Retrieve the first file level variable satisfying the provided predicate.
predicate | Predicate defining a valid variable. |
userData | User data forwarded to the predicate calls. |
Any | exception potentially thrown from the provided predicate. |
RFK_NODISCARD REFUREKU_API Vector< Variable const * > rfk::Database::getFileLevelVariablesByPredicate | ( | Predicate< Variable > | predicate, |
void * | userData | ||
) | const |
Retrieve all file level variables satisfying the provided predicate.
predicate | Predicate defining a valid variable. |
userData | User data forwarded to the predicate calls. |
Any | exception potentially thrown from the provided predicate. |
|
noexcept |
Get the number of reflected file level variables in the database.
|
noexcept |
Retrieve a function by id.
id | The id of the function. |
|
noexcept |
Retrieve a fundamental archetype by id.
id | The id of the fundamental archetype. |
|
noexcept |
Retrieve a fundamental archetype by name.
name | The name of the fundamental archetype. |
|
noexcept |
Retrieve a method by id.
id | The id of the method. |
|
noexcept |
Retrieve a namespace by id.
id | The id of the namespace. |
RFK_NODISCARD REFUREKU_API Namespace const * rfk::Database::getNamespaceByName | ( | char const * | name | ) | const |
Retrieve a namespace by name. Can search nested namespaces directly using :: separator. Example: getNamespace("namespace1::namespace2") will get the namespace2 nested inside namespace1 if it exists.
name | The name of the namespace. |
BadNamespaceFormat | if the provided namespace name has : instead of :: as a separator, or starts/ends with :. |
|
noexcept |
Retrieve a static field by id.
id | The id of the static field. |
|
noexcept |
Retrieve a static method by id.
id | The id of the static method. |
|
noexcept |
Retrieve a struct by id.
id | The id of the struct. |
|
noexcept |
Retrieve a variable by id.
id | The id of the variable. |
|
friend |
Get a reference to the database of this program.