HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Plugin Namespace Reference

Typedefs

typedef voidHandle
 

Functions

OIIO_API const char * plugin_extension (void)
 
OIIO_API Handle open (const char *plugin_filename, bool global=true)
 
Handle open (const std::string &plugin_filename, bool global=true)
 
OIIO_API bool close (Handle plugin_handle)
 
OIIO_API voidgetsym (Handle plugin_handle, const char *symbol_name, bool report_error=true)
 
voidgetsym (Handle plugin_handle, const std::string &symbol_name, bool report_error=true)
 
OIIO_API std::string geterror (void)
 

Typedef Documentation

typedef void* Plugin::Handle

Definition at line 53 of file plugin.h.

Function Documentation

OIIO_API bool Plugin::close ( Handle  plugin_handle)

Close the open plugin with the given handle and return true upon success. If some error occurred, return false and the next call to geterror() will contain an explanatory message.

OIIO_API std::string Plugin::geterror ( void  )

Return any error messages associated with the last call to any of open, close, or getsym. Note that in a multithreaded environment, it's up to the caller to properly mutex to ensure that no other thread has called open, close, or getsym (all of which clear or overwrite the error message) between the error-generating call and geterror.

OIIO_API void* Plugin::getsym ( Handle  plugin_handle,
const char *  symbol_name,
bool  report_error = true 
)

Get the address of the named symbol from the open plugin handle. If some error occurred, return nullptr and the next call to geterror() will contain an explanatory message (unless report_error is false, in which case the error message will be suppressed).

void* Plugin::getsym ( Handle  plugin_handle,
const std::string symbol_name,
bool  report_error = true 
)
inline

Definition at line 88 of file plugin.h.

OIIO_API Handle Plugin::open ( const char *  plugin_filename,
bool  global = true 
)

Open the named plugin, return its handle. If it could not be opened, return 0 and the next call to geterror() will contain an explanatory message. If the 'global' parameter is true, all symbols from the plugin will be available to the app (on Unix-like platforms; this has no effect on Windows).

Handle Plugin::open ( const std::string plugin_filename,
bool  global = true 
)
inline

Definition at line 69 of file plugin.h.

OIIO_API const char* Plugin::plugin_extension ( void  )

Return the platform-dependent suffix for plug-ins ("dll" on Windows, "so" on Linux, "dylib" on Mac OS X.