StateFS
 All Classes Files Functions Variables Typedefs Enumerations Groups Pages
Classes | Macros | Typedefs | Functions
Loader API

Provider loader API description. Usage is described here. More...

Classes

struct  statefs_loader
 
class  statefs::Loader
 

Macros

#define STATEFS_CPP_LOADER_VERSION   STATEFS_MK_VERSION(4, 0)
 

Typedefs

typedef struct statefs_loader *(* statefs_loader_fn )(void)
 
typedef std::shared_ptr
< statefs_provider
statefs::provider_ptr
 

Functions

static bool statefs_is_loader_compatible (struct statefs_loader *p)
 
struct statefs_loaderstatefs_loader_get (void)
 
virtual provider_ptr statefs::Loader::load (std::string const &path, statefs_server *server)=0
 
virtual std::string statefs::Loader::name () const =0
 
virtual bool statefs::Loader::is_reloadable () const =0
 
unsigned statefs::Loader::version ()
 
static char const * statefs::cpp_loader_accessor ()
 

Detailed Description

Provider loader API description. Usage is described here.

Typedef Documentation

typedef struct statefs_loader*(* statefs_loader_fn)(void)
read

Signature of statefs_loader_get function must be defined by loader

Function Documentation

virtual bool statefs::Loader::is_reloadable ( ) const
pure virtual

if loader can't be unloaded and loaded back w/o issues this function should return false. Statefs expects this property can change

Returns
false if it is unsafe to reopen loader

Implemented in statefs::inout::Loader, and DefaultLoader.

virtual provider_ptr statefs::Loader::load ( std::string const &  path,
statefs_server server 
)
pure virtual

called to load provider

Parameters
pathprovider path
serverserver notification interface for provider
Returns
pointer to provider handle

Implemented in statefs::inout::Loader, and DefaultLoader.

virtual std::string statefs::Loader::name ( ) const
pure virtual

provider type name, e.g. "default" loader used to load providers by default, e.g. "qt" can be used to load Qt-based providers

Returns
loader type name

Implemented in statefs::inout::Loader, and DefaultLoader.

static bool statefs_is_loader_compatible ( struct statefs_loader p)
inlinestatic

used by server to check compatibility with loader version

struct statefs_loader* statefs_loader_get ( void  )
read

Function defined in provider library to access the root node