libvariant
 All Classes Namespaces Files Functions Enumerations Groups
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
libvariant::AdvSchemaLoader Class Reference

#include <Variant/SchemaLoader.h>

Inheritance diagram for libvariant::AdvSchemaLoader:
libvariant::SchemaLoader

Public Member Functions

void AddPath (const std::string &path)
 
virtual bool HandleMissing (const std::string &uri, LoaderError &error)
 
- Public Member Functions inherited from libvariant::SchemaLoader
 SchemaLoader (SchemaLoader *b)
 
virtual Variant GetSchema (const std::string &uri)
 
virtual std::map< std::string,
Variant
AddSchema (const std::string &uri, Variant schema)
 
virtual void ForgetSchema (const std::string &uri)
 
void SetMissingHandler (MissingHandlerType, void *ctx)
 

Protected Member Functions

bool LoadFromFile (URIInfo &info, LoaderError &error)
 
bool LoadFromCurl (URIInfo &info, LoaderError &error)
 

Protected Attributes

std::vector< std::string > paths
 
- Protected Attributes inherited from libvariant::SchemaLoader
MissingHandlerType missingHandler
 
void * missingctx
 
std::map< std::string, Variantschemas
 
SchemaLoaderbase
 

Additional Inherited Members

- Public Types inherited from libvariant::SchemaLoader
typedef bool(* MissingHandlerType )(SchemaLoader *, const std::string &, LoaderError &, void *)
 
- Static Public Member Functions inherited from libvariant::SchemaLoader
static void NormSchema (Variant &schema, const std::string &uri)
 
static std::string ResolveURI (const std::string &base, const std::string &href)
 
static bool ParseURI (URIInfo &info, const std::string &uri)
 
- Static Protected Member Functions inherited from libvariant::SchemaLoader
static void SearchForTrustedSchemas (std::map< std::string, Variant > &m, Variant schema, const std::string &uri)
 

Detailed Description

The advanced schema loader will try to load missing schemas from the file system and optionally curl if built. If the url begins with file:// it will always use LoadFromFile otherwise if the protocol is empty it will try loading from a file then try loading from curl. Otherwise if the protocol is not file:// it will try to load from curl.

Member Function Documentation

void libvariant::AdvSchemaLoader::AddPath ( const std::string &  path)

The advanced schema loader will search for a schema in the paths added to it on the file system. If the schema uri looks like a relative path, then it will be searched for in the paths set with this function. If no paths are added, then only absolute paths will be looked up in the file system.


The documentation for this class was generated from the following files: