libcrn  3.9.5
A document image processing library
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | List of all members
crn::DataFactory Class Reference

Produces CRNData objects from XML. More...

#include <CRNDataFactory.h>

Public Member Functions

 DataFactory (const DataFactory &)=delete
 
 DataFactory (DataFactory &&)=delete
 
DataFactoryoperator= (const DataFactory &)=delete
 
DataFactoryoperator= (DataFactory &&)=delete
 
 ~DataFactory ()
 Destructor. More...
 

Static Public Member Functions

static UObject CreateData (xml::Element &el)
 Creates and initializes a SObject from an XML element. More...
 
static bool RegisterClass (const String &name, std::unique_ptr< DataFactoryElementBase > &&cstr)
 Registers a class in the factory. More...
 
static String GetKnownTypes ()
 Returns the list of registered classes. More...
 

Detailed Description

Produces CRNData objects from XML.

A factory to produce CRNData objects from an XML element

Author
Yann LEYDIER
Date
13 October 2008
Version
0.3

Definition at line 68 of file CRNDataFactory.h.

Constructor & Destructor Documentation

crn::DataFactory::DataFactory ( const DataFactory )
delete
crn::DataFactory::DataFactory ( DataFactory &&  )
delete
DataFactory::~DataFactory ( )

Destructor.

Destructor

Definition at line 105 of file CRNDataFactory.cpp.

Member Function Documentation

UObject DataFactory::CreateData ( xml::Element el)
static

Creates and initializes a SObject from an XML element.

Creates and initializes a CRNData from an XML element

Exceptions
ExceptionInvalidArgumentnull XML element
ExceptionRuntimeimpossible to read the XML element
ExceptionNotFoundunknown type
Parameters
[in]elthe XML element to use for initialization
Returns
a pointer to the newly created object, or nullptr if failed

Definition at line 46 of file CRNDataFactory.cpp.

String DataFactory::GetKnownTypes ( )
static

Returns the list of registered classes.

Returns the list of registered classes

Returns
a string containing the registered class names

Definition at line 84 of file CRNDataFactory.cpp.

DataFactory& crn::DataFactory::operator= ( const DataFactory )
delete
DataFactory& crn::DataFactory::operator= ( DataFactory &&  )
delete
bool DataFactory::RegisterClass ( const String name,
std::unique_ptr< DataFactoryElementBase > &&  cstr 
)
static

Registers a class in the factory.

Registers a class in the factory

Parameters
[in]namethe class name
[in]cstrthe constructor for this class
Returns
false if already registered, true else

Definition at line 68 of file CRNDataFactory.cpp.


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