2 #include "samplefactory.h"
5 #include "sample_monocrystal.h"
10 * @brief The default constructor.
11 * @param geometry the Geometry use to fill the Reflection._geometry.
14 SampleFactory::SampleFactory(hkl::Geometry
& geometry
) :
19 std::vector
<SampleType
> SampleFactory::types() const
21 std::vector
<SampleType
> types
;
22 types
.push_back(SAMPLE_MONOCRYSTAL
);
28 * @brief Create a new reflection.
29 * @return The created Reflection.
32 hkl::Sample
* SampleFactory::create(const std::string
& name
, hkl::SampleType type
) const throw(hkl::HKLException
)
38 case SAMPLE_MONOCRYSTAL
:
39 sample
= new sample::MonoCrystal(_geometry
, name
);
42 HKLEXCEPTION("Unknown sample Type.", "Please use a correct type.");