Mantid
Loading...
Searching...
No Matches
Classes | Namespaces | Macros | Typedefs
UnitFactory.h File Reference
#include "MantidKernel/DllConfig.h"
#include "MantidKernel/DynamicFactory.h"
#include "MantidKernel/SingletonHolder.h"
#include "MantidKernel/Unit.h"

Go to the source code of this file.

Classes

class  Mantid::Kernel::UnitFactoryImpl
 Creates instances of concrete units. More...
 

Namespaces

namespace  Mantid
 Helper class which provides the Collimation Length for SANS instruments.
 
namespace  Mantid::Kernel
 

Macros

#define DECLARE_UNIT(classname)
 

Typedefs

using Mantid::Kernel::UnitFactory = SingletonHolder< UnitFactoryImpl >
 

Macro Definition Documentation

◆ DECLARE_UNIT

#define DECLARE_UNIT (   classname)
Value:
namespace { \
Mantid::Kernel::RegistrationHelper \
register_unit_##classname(((Mantid::Kernel::UnitFactory::Instance().subscribe<classname>(#classname)), 0)); \
} \
const std::string Mantid::Kernel::Units::classname::unitID() const { return #classname; }
static T & Instance()
Return a reference to the Singleton instance, creating it if it does not already exist Creation is do...

Definition at line 17 of file UnitFactory.h.