thepeg is hosted by Hepforge, IPPP Durham
ThePEG 2.3.0
LWH::TreeFactory Class Reference

The creator of trees. More...

#include <TreeFactory.h>

Inheritance diagram for LWH::TreeFactory:

Public Member Functions

virtual ~TreeFactory ()
 Destructor.
 
ITree * create ()
 Creates a new tree that is not associated with a store.
 
TreecreateTree (const std::string &storeName)
 Creates a new Tree and associates it with a store.
 
ITree * create (const std::string &storeName, const std::string &storeType="", bool readOnly=false, bool createNew=false, const std::string &="")
 Creates a new Tree and associates it with a store.
 

Private Member Functions

void clear ()
 Delete all trees.
 

Private Attributes

std::set< Tree * > trees
 The created trees.
 

Detailed Description

The creator of trees.

Definition at line 27 of file TreeFactory.h.

Constructor & Destructor Documentation

◆ ~TreeFactory()

virtual LWH::TreeFactory::~TreeFactory ( )
inlinevirtual

Destructor.

Definition at line 32 of file TreeFactory.h.

References clear().

Member Function Documentation

◆ clear()

void LWH::TreeFactory::clear ( )
inlineprivate

Delete all trees.

Definition at line 82 of file TreeFactory.h.

References trees.

Referenced by ~TreeFactory().

◆ create() [1/2]

ITree * LWH::TreeFactory::create ( )
inline

Creates a new tree that is not associated with a store.

Definition at line 39 of file TreeFactory.h.

References trees.

◆ create() [2/2]

ITree * LWH::TreeFactory::create ( const std::string &  storeName,
const std::string &  storeType = "",
bool  readOnly = false,
bool  createNew = false,
const std::string &  = "" 
)
inline

Creates a new Tree and associates it with a store.

The store is assumed to be write-only. The store will be created.

Parameters
storeNameThe name of the store, if empty (""), the tree is created in memory and therefore will not be associated with a file.
storeTypemust be "xml".
readOnlymust be false since we cannot read in trees.
createNewmust be true indicating that the file will be created

Definition at line 68 of file TreeFactory.h.

◆ createTree()

Tree * LWH::TreeFactory::createTree ( const std::string &  storeName)
inline

Creates a new Tree and associates it with a store.

The store is assumed to be write-only. The store will be created.

Parameters
storeNameThe name of the store, if empty (""), the tree is created in memory and therefore will not be associated with a file.

Definition at line 53 of file TreeFactory.h.

Member Data Documentation

◆ trees

std::set<Tree *> LWH::TreeFactory::trees
private

The created trees.

Definition at line 89 of file TreeFactory.h.

Referenced by clear(), and create().


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