EMAN::FactoryBase Class Reference

A class one may inherit from to ensure that the responsibilities of being incorporated into an EMAN2::Factory are met. More...

#include <emobject.h>

Inheritance diagram for EMAN::FactoryBase:

Inheritance graph
[legend]
Collaboration diagram for EMAN::FactoryBase:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 FactoryBase ()
virtual ~FactoryBase ()
virtual string get_name () const =0
 Get the unique name of this class (especially for factory based instantiation access).
virtual string get_desc () const =0
 Get a clear, concise description of this class.
Dict get_params () const
 get a copy of the parameters of this class
void set_params (const Dict &new_params)
 Set new parameters.
virtual TypeDict get_param_types () const =0
void insert_params (const Dict &new_params)
 Insert parameters.
Dict copy_relevant_params (const FactoryBase *const that) const

Protected Attributes

Dict params
 This is the dictionary the stores the parameters of the object.


Detailed Description

A class one may inherit from to ensure that the responsibilities of being incorporated into an EMAN2::Factory are met.

This class is abstract.

Author:
David Woolford
Date:
Feb 2008

Definition at line 873 of file emobject.h.


Constructor & Destructor Documentation

EMAN::FactoryBase::FactoryBase (  )  [inline]

Definition at line 876 of file emobject.h.

00876 {}

virtual EMAN::FactoryBase::~FactoryBase (  )  [inline, virtual]

Definition at line 877 of file emobject.h.

00877 {};


Member Function Documentation

virtual string EMAN::FactoryBase::get_name (  )  const [pure virtual]

virtual string EMAN::FactoryBase::get_desc (  )  const [pure virtual]

Dict EMAN::FactoryBase::get_params (  )  const [inline]

get a copy of the parameters of this class

Returns:
a copy of the parameters of this class

Definition at line 892 of file emobject.h.

References params.

Referenced by EMAN::SaffOrientationGenerator::gen_orientations(), and EMAN::SaffOrientationGenerator::get_orientations_tally().

00892 { return params; }

void EMAN::FactoryBase::set_params ( const Dict new_params  )  [inline]

Set new parameters.

Old parameters are cleared

Parameters:
new_params the new parameters

Reimplemented in EMAN::InterpolatedFRC.

Definition at line 897 of file emobject.h.

References EMAN::Dict::clear(), insert_params(), and params.

Referenced by EMAN::OptimumOrientationGenerator::gen_orientations().

00898                 {
00899                         params.clear();
00900                         insert_params(new_params);
00901                 }

virtual TypeDict EMAN::FactoryBase::get_param_types (  )  const [pure virtual]

void EMAN::FactoryBase::insert_params ( const Dict new_params  )  [inline]

Insert parameters.

Previously present parameters are replaced, new ones are inserted.

Parameters:
new_params the parameters to insert

Definition at line 910 of file emobject.h.

References EMAN::Dict::begin(), EMAN::Dict::end(), EMAN::TypeDict::find_type(), get_param_types(), InvalidParameterException, and params.

Referenced by set_params().

00911                 {
00912                 // this is really inserting OR individually replacing...
00913                 // the old data will be kept if it is not written over
00914                         TypeDict permissable_params = get_param_types();
00915                         for ( Dict::const_iterator it = new_params.begin(); it != new_params.end(); ++it )
00916                         {
00917 
00918                                 if ( !permissable_params.find_type(it->first) )
00919                                 {
00920                                         throw InvalidParameterException(it->first);
00921                                 }
00922                                 params[it->first] = it->second;
00923                         }
00924                 }

Dict EMAN::FactoryBase::copy_relevant_params ( const FactoryBase *const   that  )  const [inline]

Definition at line 926 of file emobject.h.

References EMAN::Dict::copy_keys_in(), get_param_types(), and params.

Referenced by EMAN::OptimumOrientationGenerator::gen_orientations().

00927                 {
00928                         return params.copy_keys_in(that->get_param_types());
00929 
00930                 }


Member Data Documentation

Dict EMAN::FactoryBase::params [mutable, protected]

This is the dictionary the stores the parameters of the object.

Reimplemented in EMAN::InterpolatedFRC.

Definition at line 934 of file emobject.h.

Referenced by EMAN::OrientationGenerator::add_orientation(), EMAN::nnSSNR_ctfReconstructor::buildFFTVolume(), EMAN::nn4_ctfReconstructor::buildFFTVolume(), EMAN::nnSSNR_Reconstructor::buildFFTVolume(), EMAN::nn4Reconstructor::buildFFTVolume(), EMAN::nnSSNR_ctfReconstructor::buildNorm2Volume(), EMAN::nnSSNR_Reconstructor::buildNorm2Volume(), EMAN::nnSSNR_ctfReconstructor::buildNorm3Volume(), EMAN::nnSSNR_ctfReconstructor::buildNormVolume(), EMAN::nn4_ctfReconstructor::buildNormVolume(), EMAN::nnSSNR_Reconstructor::buildNormVolume(), EMAN::nn4Reconstructor::buildNormVolume(), copy_relevant_params(), EMAN::FourierReconstructor::determine_slice_agreement(), EMAN::FourierReconstructor::do_insert_slice_work(), EMAN::nnSSNR_ctfReconstructor::finish(), EMAN::nnSSNR_Reconstructor::finish(), EMAN::BackProjectionReconstructor::finish(), EMAN::BaldwinWoolfordReconstructor::finish(), EMAN::FourierReconstructor::finish(), EMAN::OptimumOrientationGenerator::gen_orientations(), EMAN::SaffOrientationGenerator::gen_orientations(), EMAN::EvenOrientationGenerator::gen_orientations(), EMAN::RandomOrientationGenerator::gen_orientations(), EMAN::EmanOrientationGenerator::gen_orientations(), EMAN::HSym::get_asym_unit_points(), EMAN::DSym::get_asym_unit_points(), EMAN::CSym::get_asym_unit_points(), EMAN::DSym::get_asym_unit_triangles(), EMAN::CSym::get_asym_unit_triangles(), EMAN::HSym::get_delimiters(), EMAN::DSym::get_delimiters(), EMAN::CSym::get_delimiters(), EMAN::HSym::get_max_csym(), EMAN::DSym::get_max_csym(), EMAN::CSym::get_max_csym(), EMAN::HSym::get_nsym(), EMAN::DSym::get_nsym(), EMAN::CSym::get_nsym(), EMAN::OptimumOrientationGenerator::get_orientations_tally(), EMAN::SaffOrientationGenerator::get_orientations_tally(), EMAN::EvenOrientationGenerator::get_orientations_tally(), EMAN::EmanOrientationGenerator::get_orientations_tally(), get_params(), EMAN::HSym::get_sym(), EMAN::DSym::get_sym(), EMAN::CSym::get_sym(), EMAN::FourierPixelInserter3D::init(), EMAN::BaldwinWoolfordReconstructor::insert_density_at(), insert_params(), EMAN::BaldwinWoolfordReconstructor::insert_pixel(), EMAN::BackProjectionReconstructor::insert_slice(), EMAN::WienerFourierReconstructor::insert_slice(), EMAN::BaldwinWoolfordReconstructor::insert_slice(), EMAN::FourierReconstructor::insert_slice(), EMAN::BaldwinWoolfordReconstructor::insert_slice_weights(), EMAN::HSym::is_in_asym_unit(), EMAN::DSym::is_in_asym_unit(), EMAN::CSym::is_in_asym_unit(), EMAN::BackProjectionReconstructor::load_default_settings(), EMAN::WienerFourierReconstructor::load_default_settings(), EMAN::BaldwinWoolfordReconstructor::load_default_settings(), EMAN::FourierReconstructor::load_inserter(), EMAN::FourierReconstructor::load_interp_FRC_calculator(), EMAN::Reconstructor::operator[](), EMAN::Reconstructor::print_params(), EMAN::FourierReconstructor::print_stats(), set_params(), EMAN::nnSSNR_ctfReconstructor::setup(), EMAN::nn4_ctfReconstructor::setup(), EMAN::nnSSNR_Reconstructor::setup(), EMAN::nn4Reconstructor::setup(), EMAN::BackProjectionReconstructor::setup(), EMAN::WienerFourierReconstructor::setup(), EMAN::BaldwinWoolfordReconstructor::setup(), EMAN::FourierReconstructor::setup(), EMAN::FourierReconstructorSimple2D::setup(), and EMAN::FourierReconstructor::zero_memory().


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

Generated on Sat Nov 21 02:20:19 2009 for EMAN2 by  doxygen 1.5.6