EMAN2
Public Member Functions | Private Attributes
EMAN::TypeDict Class Reference

TypeDict is a dictionary to store <string, EMObject::ObjectType> pair. More...

#include <emobject.h>

Collaboration diagram for EMAN::TypeDict:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 TypeDict ()
 ~TypeDict ()
vector< string > keys () const
size_t size () const
void put (const string &key, EMObject::ObjectType o, const string &desc="")
string get_type (const string &key)
string get_desc (const string &key)
string operator[] (const string &key)
void dump ()
bool find_type (const string &type)

Private Attributes

map< string, string > type_dict
map< string, string > desc_dict

Detailed Description

TypeDict is a dictionary to store <string, EMObject::ObjectType> pair.

It is mainly used to store processor-like class's parameter information: <parameter-name, parameter-type>. Typical usage of this class:

TypeDict d; d.put("with", EMObject::EMDATA); d.put("lowpass", EMObject::FLOAT);

string lowpass_type = d["lowpass"];

Definition at line 307 of file emobject.h.


Constructor & Destructor Documentation

EMAN::TypeDict::TypeDict ( ) [inline]

Definition at line 310 of file emobject.h.

                        {
                        }
EMAN::TypeDict::~TypeDict ( ) [inline]

Definition at line 314 of file emobject.h.

                        {
                        }

Member Function Documentation

void TypeDict::dump ( )

Definition at line 1059 of file emobject.cpp.

References desc_dict, and type_dict.

{
        map < string, string >::iterator p;
        for (p = type_dict.begin(); p != type_dict.end(); p++) {
                printf("\t%s    %s  %s\n",
                           p->first.c_str(), p->second.c_str(), desc_dict[p->first].c_str());
        }
}
bool EMAN::TypeDict::find_type ( const string &  type) [inline]

Definition at line 358 of file emobject.h.

References type_dict.

Referenced by EMAN::FactoryBase::insert_params().

{  if ( type_dict.find(type) != type_dict.end() ) return true; return false; }
string EMAN::TypeDict::get_desc ( const string &  key) [inline]

Definition at line 346 of file emobject.h.

References desc_dict, and key.

Referenced by EMAN::dump_factory_list().

                        {
                                return desc_dict[key];
                        }
string EMAN::TypeDict::get_type ( const string &  key) [inline]

Definition at line 341 of file emobject.h.

References key, and type_dict.

Referenced by EMAN::dump_factory_list().

                        {
                                return type_dict[key];
                        }
vector< string > EMAN::TypeDict::keys ( ) const [inline]

Definition at line 318 of file emobject.h.

References type_dict.

Referenced by EMAN::Dict::copy_keys_in(), and EMAN::dump_factory_list().

                        {
                                vector < string > result;
                                map < string, string >::const_iterator p;

                                for (p = type_dict.begin(); p != type_dict.end(); p++) {
                                        result.push_back(p->first);
                                }

                                return result;
                        }
string EMAN::TypeDict::operator[] ( const string &  key) [inline]

Definition at line 351 of file emobject.h.

References key, and type_dict.

                        {
                                return type_dict[key];
                        }
void EMAN::TypeDict::put ( const string &  key,
EMObject::ObjectType  o,
const string &  desc = "" 
) [inline]

Definition at line 335 of file emobject.h.

References desc_dict, EMAN::EMObject::get_object_type_name(), key, and type_dict.

Referenced by EMAN::OptimumOrientationGenerator::get_param_types(), EMAN::SaffOrientationGenerator::get_param_types(), EMAN::EvenOrientationGenerator::get_param_types(), EMAN::RandomOrientationGenerator::get_param_types(), EMAN::EmanOrientationGenerator::get_param_types(), EMAN::OrientationGenerator::get_param_types(), EMAN::HSym::get_param_types(), EMAN::DSym::get_param_types(), EMAN::CSym::get_param_types(), EMAN::FourierPixelInserter3D::get_param_types(), EMAN::XYZReconstructor::get_param_types(), EMAN::nnSSNR_ctfReconstructor::get_param_types(), EMAN::nn4_ctf_rectReconstructor::get_param_types(), EMAN::nn4_ctfwReconstructor::get_param_types(), EMAN::nn4_ctfReconstructor::get_param_types(), EMAN::nnSSNR_Reconstructor::get_param_types(), EMAN::nn4_rectReconstructor::get_param_types(), EMAN::nn4Reconstructor::get_param_types(), EMAN::BackProjectionReconstructor::get_param_types(), EMAN::FourierPlaneReconstructor::get_param_types(), EMAN::FourierReconstructor::get_param_types(), EMAN::FourierReconstructorSimple2D::get_param_types(), EMAN::XYZProjector::get_param_types(), EMAN::ChaoProjector::get_param_types(), EMAN::StandardProjector::get_param_types(), EMAN::MaxValProjector::get_param_types(), EMAN::PawelProjector::get_param_types(), EMAN::FourierGriddingProjector::get_param_types(), EMAN::GaussFFTProjector::get_param_types(), EMAN::XYZProcessor::get_param_types(), EMAN::CTF_Processor::get_param_types(), EMAN::NewBandpassTanhProcessor::get_param_types(), EMAN::NewHomomorphicTanhProcessor::get_param_types(), EMAN::NewHighpassTanhProcessor::get_param_types(), EMAN::NewLowpassTanhProcessor::get_param_types(), EMAN::NewHomomorphicButterworthProcessor::get_param_types(), EMAN::NewHighpassButterworthProcessor::get_param_types(), EMAN::NewLowpassButterworthProcessor::get_param_types(), EMAN::NewRadialTableProcessor::get_param_types(), EMAN::SHIFTProcessor::get_param_types(), EMAN::NewHomomorphicGaussProcessor::get_param_types(), EMAN::NewBandpassGaussProcessor::get_param_types(), EMAN::NewLowpassGaussProcessor::get_param_types(), EMAN::NewHomomorphicTopHatProcessor::get_param_types(), EMAN::NewBandpassTopHatProcessor::get_param_types(), EMAN::NewFourierProcessor::get_param_types(), EMAN::MirrorProcessor::get_param_types(), EMAN::RotateInFSProcessor::get_param_types(), EMAN::ConvolutionKernelProcessor::get_param_types(), EMAN::BinarySkeletonizerProcessor::get_param_types(), EMAN::ApplyPolynomialProfileToHelix::get_param_types(), EMAN::ModelEMCylinderProcessor::get_param_types(), EMAN::HistogramBin::get_param_types(), EMAN::RadialProcessor::get_param_types(), EMAN::FFTProcessor::get_param_types(), EMAN::TomoTiltAngleWeightProcessor::get_param_types(), EMAN::TomoTiltEdgeMaskProcessor::get_param_types(), EMAN::WaveletProcessor::get_param_types(), EMAN::CCDNormProcessor::get_param_types(), EMAN::TestImageCylinder::get_param_types(), EMAN::TestImageNoiseGauss::get_param_types(), EMAN::TestImageNoiseUniformRand::get_param_types(), EMAN::TestImageCirclesphere::get_param_types(), EMAN::TestImageHollowEllipse::get_param_types(), EMAN::TestImageEllipse::get_param_types(), EMAN::TestImageSquarecube::get_param_types(), EMAN::TestImageSinewaveCircular::get_param_types(), EMAN::TestImageSinewave::get_param_types(), EMAN::TestImageSphericalWave::get_param_types(), EMAN::TestImageGaussian::get_param_types(), EMAN::TestImageAxes::get_param_types(), EMAN::TestImageGradient::get_param_types(), EMAN::TestImageLineWave::get_param_types(), EMAN::CTFSNRWeightProcessor::get_param_types(), EMAN::TestImageFourierNoiseProfile::get_param_types(), EMAN::TestImageFourierNoiseGaussian::get_param_types(), EMAN::TestImagePureGaussian::get_param_types(), EMAN::IterBinMaskProcessor::get_param_types(), EMAN::SmartMaskProcessor::get_param_types(), EMAN::SetSFProcessor::get_param_types(), EMAN::MatchSFProcessor::get_param_types(), EMAN::BinaryOperateProcessor< Type >::get_param_types(), EMAN::WatershedProcessor::get_param_types(), EMAN::DirectionalSumProcessor::get_param_types(), EMAN::PaintProcessor::get_param_types(), EMAN::CoordinateMaskFileProcessor::get_param_types(), EMAN::IndexMaskFileProcessor::get_param_types(), EMAN::LocalNormProcessor::get_param_types(), EMAN::StripeXYProcessor::get_param_types(), EMAN::SymSearchProcessor::get_param_types(), EMAN::FileFourierProcessor::get_param_types(), EMAN::SNRProcessor::get_param_types(), EMAN::FSCFourierProcessor::get_param_types(), EMAN::ToMassCenterProcessor::get_param_types(), EMAN::PhaseToMassCenterProcessor::get_param_types(), EMAN::AddMaskShellProcessor::get_param_types(), EMAN::IterMultiMaskProcessor::get_param_types(), EMAN::AutoMask3D2Processor::get_param_types(), EMAN::AutoMask3DProcessor::get_param_types(), EMAN::AutoMaskDustProcessor::get_param_types(), EMAN::AutoMaskAsymUnit::get_param_types(), EMAN::AutoMask2DProcessor::get_param_types(), EMAN::AddRandomNoiseProcessor::get_param_types(), EMAN::AddNoiseProcessor::get_param_types(), EMAN::FlipProcessor::get_param_types(), EMAN::NormalizeToLeastSquareProcessor::get_param_types(), EMAN::SubtractOptProcessor::get_param_types(), EMAN::NormalizeCircleMeanProcessor::get_param_types(), EMAN::NormalizeByMassProcessor::get_param_types(), EMAN::NormalizeMaskProcessor::get_param_types(), EMAN::BilateralProcessor::get_param_types(), EMAN::ZeroEdgePlaneProcessor::get_param_types(), EMAN::ZeroEdgeRowProcessor::get_param_types(), EMAN::DecayEdgeProcessor::get_param_types(), EMAN::BeamstopProcessor::get_param_types(), EMAN::SigmaZeroEdgeProcessor::get_param_types(), EMAN::FlattenBackgroundProcessor::get_param_types(), EMAN::GradientPlaneRemoverProcessor::get_param_types(), EMAN::FFTResampleProcessor::get_param_types(), EMAN::MedianShrinkProcessor::get_param_types(), EMAN::MeanShrinkProcessor::get_param_types(), EMAN::MinShrinkProcessor::get_param_types(), EMAN::MaxShrinkProcessor::get_param_types(), EMAN::CutoffBlockProcessor::get_param_types(), EMAN::DiffBlockProcessor::get_param_types(), EMAN::PeakOnlyProcessor::get_param_types(), EMAN::BoxStatProcessor::get_param_types(), EMAN::AreaProcessor::get_param_types(), EMAN::MaskGaussInvProcessor::get_param_types(), EMAN::MaskGaussNonuniformProcessor::get_param_types(), EMAN::MaskGaussProcessor::get_param_types(), EMAN::MaskEdgeMeanProcessor::get_param_types(), EMAN::MaskSoftProcessor::get_param_types(), EMAN::MaskSharpProcessor::get_param_types(), EMAN::CircularMaskProcessor::get_param_types(), EMAN::SigmaProcessor::get_param_types(), EMAN::RangeThresholdProcessor::get_param_types(), EMAN::FiniteProcessor::get_param_types(), EMAN::ExpProcessor::get_param_types(), EMAN::LinearXformProcessor::get_param_types(), EMAN::CollapseProcessor::get_param_types(), EMAN::BinarizeFourierProcessor::get_param_types(), EMAN::BinarizeProcessor::get_param_types(), EMAN::CutToZeroProcessor::get_param_types(), EMAN::ToMinvalProcessor::get_param_types(), EMAN::NSigmaClampingProcessor::get_param_types(), EMAN::ClampingProcessor::get_param_types(), EMAN::ScaleTransformProcessor::get_param_types(), EMAN::ApplySymProcessor::get_param_types(), EMAN::IntTranslateProcessor::get_param_types(), EMAN::TransformProcessor::get_param_types(), EMAN::AddShapeProcessor::get_param_types(), EMAN::AboveToZeroProcessor::get_param_types(), EMAN::ToZeroProcessor::get_param_types(), EMAN::ValuePowProcessor::get_param_types(), EMAN::RecipCarefullyProcessor::get_param_types(), EMAN::DoGFourierProcessor::get_param_types(), EMAN::LoGFourierProcessor::get_param_types(), EMAN::LinearRampProcessor::get_param_types(), EMAN::LowpassAutoBProcessor::get_param_types(), EMAN::Wiener2DFourierProcessor::get_param_types(), EMAN::CtfSimProcessor::get_param_types(), EMAN::KmeansSegmentProcessor::get_param_types(), EMAN::DistanceSegmentProcessor::get_param_types(), EMAN::Wiener2DAutoAreaProcessor::get_param_types(), EMAN::ConvolutionProcessor::get_param_types(), EMAN::AmpweightFourierProcessor::get_param_types(), EMAN::Axis0FourierProcessor::get_param_types(), EMAN::FourierAnlProcessor::get_param_types(), EMAN::FourierProcessor::get_param_types(), EMAN::XYZCmp::get_param_types(), EMAN::FRCCmp::get_param_types(), EMAN::PhaseCmp::get_param_types(), EMAN::OptVarianceCmp::get_param_types(), EMAN::OptSubCmp::get_param_types(), EMAN::QuadMinDotCmp::get_param_types(), EMAN::TomoFscCmp::get_param_types(), EMAN::TomoCccCmp::get_param_types(), EMAN::DotCmp::get_param_types(), EMAN::SqEuclideanCmp::get_param_types(), EMAN::LodCmp::get_param_types(), EMAN::CccCmp::get_param_types(), EMAN::XYZAverager::get_param_types(), EMAN::AbsMaxMinAverager::get_param_types(), EMAN::MinMaxAverager::get_param_types(), EMAN::TomoAverager::get_param_types(), EMAN::FourierWeightAverager::get_param_types(), EMAN::ImageAverager::get_param_types(), EMAN::varimax::get_param_types(), EMAN::PCAlarge::get_param_types(), EMAN::PCAsmall::get_param_types(), EMAN::SVDAnalyzer::get_param_types(), EMAN::KMeansAnalyzer::get_param_types(), EMAN::ShapeAnalyzer::get_param_types(), EMAN::InertiaMatrixAnalyzer::get_param_types(), EMAN::XYZAligner::get_param_types(), EMAN::FRM2DAligner::get_param_types(), EMAN::RT3DSymmetryAligner::get_param_types(), EMAN::RT3DSphereAligner::get_param_types(), EMAN::RT3DGridAligner::get_param_types(), EMAN::Refine3DAlignerQuaternion::get_param_types(), EMAN::Refine3DAlignerGrid::get_param_types(), EMAN::SymAlignProcessorQuat::get_param_types(), EMAN::RefineAlignerCG::get_param_types(), EMAN::RefineAligner::get_param_types(), EMAN::SymAlignProcessor::get_param_types(), EMAN::RTFSlowExhaustiveAligner::get_param_types(), EMAN::RTFExhaustiveAligner::get_param_types(), EMAN::RotateTranslateFlipAlignerPawel::get_param_types(), EMAN::RotateTranslateFlipScaleAlignerIterative::get_param_types(), EMAN::RotateTranslateFlipScaleAligner::get_param_types(), EMAN::RotateTranslateBestAligner::get_param_types(), EMAN::RotateTranslateAlignerPawel::get_param_types(), EMAN::RotateTranslateScaleAlignerIterative::get_param_types(), EMAN::RotateTranslateAlignerIterative::get_param_types(), EMAN::RotateTranslateScaleAligner::get_param_types(), EMAN::RotateTranslateAligner::get_param_types(), EMAN::RotationalAlignerIterative::get_param_types(), EMAN::RotationalAligner::get_param_types(), EMAN::TranslationalAligner::get_param_types(), EMAN::ScaleAligner::get_param_types(), EMAN::RotateTranslateFlipAlignerIterative::static_get_param_types(), EMAN::RotateTranslateFlipAligner::static_get_param_types(), EMAN::RotateFlipAlignerIterative::static_get_param_types(), and EMAN::RotateFlipAligner::static_get_param_types().

size_t EMAN::TypeDict::size ( ) const [inline]

Definition at line 330 of file emobject.h.

References type_dict.

Referenced by EMAN::dump_factory_list().

                        {
                                return type_dict.size();
                        }

Member Data Documentation

map< string, string > EMAN::TypeDict::desc_dict [private]

Definition at line 362 of file emobject.h.

Referenced by dump(), get_desc(), and put().

map< string, string > EMAN::TypeDict::type_dict [private]

Definition at line 361 of file emobject.h.

Referenced by dump(), find_type(), get_type(), keys(), operator[](), put(), and size().


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