Go to the source code of this file.
|
#define | SF_DL_NAME_FUNC_NAME "_dl_name_" |
| Name of the function to resolve from a library to be able to set the library filename when dynamically loaded.
|
|
#define | SF_DL_NAME_FUNC _dl_name_ |
|
#define | SF_DL_STRING_COPY(dest, src, sz) strncpy(dest, src, sz) |
|
#define | SF_DL_INFORMATION(name, description) |
|
#define | SF_DL_NAME_FUNC_TYPE const char* (*) (const char*) |
| Type for casting a resolved function pointer to.
|
|
#define | SF_DECL_IFACE(InterfaceType, ParamType, FuncName) |
| Declares a public static function in the class where it is used. Where: InterfaceType: Global typename of the interface class (virtual base class). ParamType: Global typename of the parameters passed. FuncName: Name of the public function in the interface class for registering derived classes or to create them.
|
|
#define | SF_IMPL_IFACE(InterfaceType, ParamType, FuncName) |
| Implements the public static function in the class where it is used.
|
|
#define | SF_REG_CLASS(InterfaceType, ParamType, FuncName, DerivedType, RegName, Description) |
| Registers a derived type from the interface type. Where: DerivedType: The derived typename from InterfaceType RegName: Quoted character string containing the name. Description: Quoted character string holding the name.
|
|
|
const char * | _dl_name_ (const char *name) |
| Declaration of function to set and get the dynamic library name when loading.
|
|
std::string | sf::getLibraryName () |
| function to get the library filename this function is called from.
|
|
◆ SF_DECL_IFACE
#define SF_DECL_IFACE |
( |
|
InterfaceType, |
|
|
|
ParamType, |
|
|
|
FuncName |
|
) |
| |
Value:private: \
std::string _Register_Name_; \
\
public: \
Template class used to register derived classes from a (virtual) interface class. Registering name an...
Definition TClassRegistration.h:124
Declares a public static function in the class where it is used. Where: InterfaceType: Global typename of the interface class (virtual base class). ParamType: Global typename of the parameters passed. FuncName: Name of the public function in the interface class for registering derived classes or to create them.
◆ SF_DL_INFORMATION
#define SF_DL_INFORMATION |
( |
|
name, |
|
|
|
description |
|
) |
| |
Value: namespace \
{ \
\
{ \
static char storage[256]; \
if (nm) \
SF_DL_STRING_COPY(storage, nm, sizeof(storage)); \
return storage; \
} \
}
#define SF_DL_MARKER_BEGIN
Definition DynamicLibraryInfo.h:14
#define SF_DL_MARKER_END
Definition DynamicLibraryInfo.h:18
#define SF_DL_NAME_SEPARATOR
Definition DynamicLibraryInfo.h:9
#define SF_DL_NAME_FUNC
Definition TClassRegistration.h:13
#define TARGET_EXPORT
Definition target.h:81
Declaration of dynamically loadable library information and function for set/get the library filename.
◆ SF_DL_NAME_FUNC
◆ SF_DL_NAME_FUNC_NAME
#define SF_DL_NAME_FUNC_NAME "_dl_name_" |
Name of the function to resolve from a library to be able to set the library filename when dynamically loaded.
◆ SF_DL_NAME_FUNC_TYPE
#define SF_DL_NAME_FUNC_TYPE const char* (*) (const char*) |
Type for casting a resolved function pointer to.
◆ SF_DL_STRING_COPY
#define SF_DL_STRING_COPY |
( |
|
dest, |
|
|
|
src, |
|
|
|
sz |
|
) |
| strncpy(dest, src, sz) |
◆ SF_IMPL_IFACE
#define SF_IMPL_IFACE |
( |
|
InterfaceType, |
|
|
|
ParamType, |
|
|
|
FuncName |
|
) |
| |
Value:
{ \
}
std::vector< entry_t > entries_t
Vector type to register implementations in.
Definition TClassRegistration.h:133
Implements the public static function in the class where it is used.
◆ SF_REG_CLASS
#define SF_REG_CLASS |
( |
|
InterfaceType, |
|
|
|
ParamType, |
|
|
|
FuncName, |
|
|
|
DerivedType, |
|
|
|
RegName, |
|
|
|
Description |
|
) |
| |
Value: namespace \
{ \
__attribute__((constructor)) void _## DerivedType## _() \
{ \
size_t dist = InterfaceType::FuncName().registerClass( \
auto inst = new DerivedType(params); \
sf::TClassRegistration<InterfaceType, ParamType>::setRegisterName(inst, RegName); \
return inst; \
}) \
); \
} \
}
Registers a derived type from the interface type. Where: DerivedType: The derived typename from InterfaceType RegName: Quoted character string containing the name. Description: Quoted character string holding the name.
◆ _dl_name_()
const char * _dl_name_ |
( |
const char * |
name | ) |
|
Declaration of function to set and get the dynamic library name when loading.