Mantid
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
Mantid::Geometry::SurfaceFactory Class Reference

Creates instances of Surfaces. More...

#include <SurfaceFactory.h>

Public Member Functions

std::unique_ptr< SurfacecreateSurface (const std::string &) const
 Creates an instance of tally given a valid key. More...
 
std::unique_ptr< SurfacecreateSurfaceID (const std::string &) const
 Creates an instance of tally given a valid key. More...
 
std::unique_ptr< SurfaceprocessLine (const std::string &) const
 Creates an instance of a surface given a valid line. More...
 

Static Public Member Functions

static SurfaceFactoryInstance ()
 Effective new command / this command. More...
 

Private Types

using MapType = std::vector< std::pair< std::string, std::unique_ptr< Surface > > >
 < Storage of surface pointers. More...
 

Private Member Functions

SurfaceFactoryoperator= (const SurfaceFactory &other)
 
void registerSurface ()
 Register tallies to be used. More...
 
 SurfaceFactory ()
 singleton constructor More...
 
 SurfaceFactory (const SurfaceFactory &other)
 

Private Attributes

std::map< char, std::string > ID
 Short letter identifiers. More...
 
MapType SGrid
 The tally stack. More...
 

Static Private Attributes

static SurfaceFactoryFOBJ
 Effective "this". More...
 

Detailed Description

Creates instances of Surfaces.

Version
1.0
Date
May 2006
Author
S. Ansell

This is a singleton class. It creates Surface* depending registered tallies and the key given. Predominately for creating tallies from an input deck where we only have the number.

Definition at line 26 of file SurfaceFactory.h.

Member Typedef Documentation

◆ MapType

using Mantid::Geometry::SurfaceFactory::MapType = std::vector<std::pair<std::string, std::unique_ptr<Surface> >>
private

< Storage of surface pointers.

Definition at line 32 of file SurfaceFactory.h.

Constructor & Destructor Documentation

◆ SurfaceFactory() [1/2]

Mantid::Geometry::SurfaceFactory::SurfaceFactory ( const SurfaceFactory other)
private

Definition at line 62 of file SurfaceFactory.cpp.

References SGrid.

◆ SurfaceFactory() [2/2]

Mantid::Geometry::SurfaceFactory::SurfaceFactory ( )
private

singleton constructor

Constructor.

Definition at line 54 of file SurfaceFactory.cpp.

References registerSurface().

Referenced by Instance().

Member Function Documentation

◆ createSurface()

std::unique_ptr< Surface > Mantid::Geometry::SurfaceFactory::createSurface ( const std::string &  Key) const

Creates an instance of tally given a valid key.

Parameters
Key:: Item to get
Exceptions
NotFoundErrorfor the key if not found
Returns
new tally object.

Definition at line 107 of file SurfaceFactory.cpp.

◆ createSurfaceID()

std::unique_ptr< Surface > Mantid::Geometry::SurfaceFactory::createSurfaceID ( const std::string &  Key) const

Creates an instance of tally given a valid key.

Parameters
Key:: Form of first ID
Exceptions
NotFoundErrorfor the key if not found
Returns
new tally object.

Definition at line 125 of file SurfaceFactory.cpp.

◆ Instance()

SurfaceFactory * Mantid::Geometry::SurfaceFactory::Instance ( )
static

Effective new command / this command.

Returns
Single instance of SurfaceFactory

Definition at line 42 of file SurfaceFactory.cpp.

References FOBJ, and SurfaceFactory().

◆ operator=()

SurfaceFactory & Mantid::Geometry::SurfaceFactory::operator= ( const SurfaceFactory other)
private

Definition at line 67 of file SurfaceFactory.cpp.

References ID, and SGrid.

◆ processLine()

std::unique_ptr< Surface > Mantid::Geometry::SurfaceFactory::processLine ( const std::string &  Line) const

Creates an instance of a surface given a valid line.

Parameters
Line:: Full description of line
Exceptions
InContainerErrorfor the key if not found
Returns
new surface object.

Definition at line 145 of file SurfaceFactory.cpp.

References Mantid::Kernel::Strings::convert(), and Mantid::Geometry::X.

◆ registerSurface()

void Mantid::Geometry::SurfaceFactory::registerSurface ( )
private

Register tallies to be used.

Definition at line 77 of file SurfaceFactory.cpp.

References ID, and SGrid.

Referenced by SurfaceFactory().

Member Data Documentation

◆ FOBJ

SurfaceFactory * Mantid::Geometry::SurfaceFactory::FOBJ
staticprivate

Effective "this".

Definition at line 34 of file SurfaceFactory.h.

Referenced by Instance().

◆ ID

std::map<char, std::string> Mantid::Geometry::SurfaceFactory::ID
private

Short letter identifiers.

Definition at line 37 of file SurfaceFactory.h.

Referenced by operator=(), and registerSurface().

◆ SGrid

MapType Mantid::Geometry::SurfaceFactory::SGrid
private

The tally stack.

Definition at line 36 of file SurfaceFactory.h.

Referenced by operator=(), registerSurface(), and SurfaceFactory().


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