Kicking it Olde Sküül! Burgerlib on Github Follow Olde Sküül on Twitter Burgerbecky on LinkedIn Burgerbecky on LinkedIn
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Burger::CodeFramework Class Reference

Manage MacOSX / iOS Framework library files. More...

Public Member Functions

 CodeFramework () noexcept
 Default constructor.
 
 ~CodeFramework ()
 Default destructor.
 
eError Init (const char *pName) noexcept
 Load a Framework.
 
void Shutdown (void) noexcept
 Release the Framework.
 
void * GetFunction (const char *pFunctionName) noexcept
 Locate a function pointer in a Framework.
 

Private Member Functions

 CodeFramework (const CodeFramework &)=delete
 
CodeFrameworkoperator= (const CodeFramework &)=delete
 
 CodeFramework (CodeFramework &&)=delete
 
CodeFrameworkoperator= (CodeFramework &&)=delete
 

Private Attributes

__CFBundle * m_pBundle
 Instance of the framework bundle.
 

Detailed Description

Manage MacOSX / iOS Framework library files.


Loading a Framework bundle on MacOSX and iOS is managed with this generic class. Initialize it with a call to Init(const char) and then call GetFunction(const char *) to extract each and every pointer to the code or data contained within.

If this class is shut down by the Shutdown() call or the class going out of scope, all of the pointers will become invalid and should never be used again.

See also
CodeLibrary

Constructor & Destructor Documentation

◆ CodeFramework() [1/3]

Burger::CodeFramework::CodeFramework ( const CodeFramework & )
privatedelete

◆ CodeFramework() [2/3]

Burger::CodeFramework::CodeFramework ( CodeFramework && )
privatedelete

◆ CodeFramework() [3/3]

Burger::CodeFramework::CodeFramework ( )
noexcept

Default constructor.


◆ ~CodeFramework()

Burger::CodeFramework::~CodeFramework ( )

Default destructor.


If a Framework was loaded, it will be released

See also
Shutdown(void)

Member Function Documentation

◆ GetFunction()

void *BURGER_API Burger::CodeFramework::GetFunction ( const char * pFunctionName)
noexcept

Locate a function pointer in a Framework.


Return a function pointer to a procedure or data contained within a shared library

Parameters
pFunctionNamePointer to a "C" string in UTF-8 encoding of the function to locate.
Returns
NULL on failure, or valid pointer on success

◆ Init()

Burger::eError BURGER_API Burger::CodeFramework::Init ( const char * pName)
noexcept

Load a Framework.


Attempt to load in a Framework using the standard paths.

Parameters
pNameName of the Framework to load
Returns
Zero on success, non-zero on failure

◆ operator=() [1/2]

CodeFramework & Burger::CodeFramework::operator= ( CodeFramework && )
privatedelete

◆ operator=() [2/2]

CodeFramework & Burger::CodeFramework::operator= ( const CodeFramework & )
privatedelete

◆ Shutdown()

void BURGER_API Burger::CodeFramework::Shutdown ( void )
noexcept

Release the Framework.


If a Framework was loaded, it will be released

Member Data Documentation

◆ m_pBundle

__CFBundle* Burger::CodeFramework::m_pBundle
private

Instance of the framework bundle.