EMAN::Dict Class Reference

Dict is a dictionary to store <string, EMObject> pair. More...

#include <emobject.h>

List of all members.

Public Member Functions

 Dict ()
 Dict (const string &key1, EMObject val1)
 Construct a Dict object from 1 key/value pair It's probably more conventional to intialize key/value pairs using operator[], but either approach is fine.
 Dict (const string &key1, EMObject val1, const string &key2, EMObject val2)
 Construct a Dict object from 2 key/value pairs.
 Dict (const string &key1, EMObject val1, const string &key2, EMObject val2, const string &key3, EMObject val3)
 Construct a Dict object from 3 key/value pairs.
 Dict (const string &key1, EMObject val1, const string &key2, EMObject val2, const string &key3, EMObject val3, const string &key4, EMObject val4)
 Construct a Dict object from 4 key/value pairs.
 Dict (const map< string, EMObject > &d)
 Construct a Dict object from a map object Calls the generic algorithm "copy".
 ~Dict ()
 Destructor Performs no explicit action besides what the compiler automatically does.
 Dict (const Dict &that)
 Copy constructor Copies all elements in dict.
Dictoperator= (const Dict &that)
 Assignment operator Copies all elements in dict.
vector< string > keys () const
 Get a vector containing all of the (string) keys in this dictionary.
vector< EMObjectvalues () const
 Get a vector containing copies of each of the EMObjects in this dictionary.
bool has_key_ci (const string &key) const
 Ask the Dictionary if it as a particular key in a case insensitive way.
bool has_key (const string &key) const
 Ask the Dictionary if it as a particular key.
size_t size () const
 Ask the Dictionary for its size.
EMObject get (const string &key) const
 Get the EMObject corresponding to the particular key Probably better to just use operator[].
EMObject get_ci (const string &key) const
 Get the EMObject corresponding to the particular key using case insensitivity.
void put (const string &key, EMObject val)
 Put the value/key pair into the dictionary probably better to just use operator[].
void erase (const string &key)
 Remove a particular key.
void clear ()
 Clear all keys wraps map.clear().
template<typename type>
type set_default (const string &key, type val)
 Default setting behavior This can be achieved using a template - d.woolford Jan 2008 (before there was a function being written for every type).
Dict copy_exclude_keys (const vector< string > &excluded_keys) const
Dict copy_exclusive_keys (const vector< string > &exclusive_keys) const
Dict copy_keys_in (const TypeDict &tdict) const
EMObjectoperator[] (const string &key)
EMObject operator[] (const string &key) const
iterator begin (void)
const_iterator begin (void) const
iterator end (void)
const_iterator end (void) const
iterator find (const string &key)
const_iterator find (const string &key) const

Private Attributes

map< string, EMObjectdict

Friends

bool operator== (const Dict &d1, const Dict &d2)
 Friend declaration operator== namespace EMAN2 operator== accesses private variables.
bool operator!= (const Dict &d1, const Dict &d2)
 Friend declaration operator!= namespace EMAN2 operator!= accesses private variables.

Classes

class  const_iterator
 Const iterator support for the Dict object This is just a wrapper, everything is inherited from the map<string,EMObject>::cons_iterator so the interface is the same as you would expect i.e for ( Dict::const_iterator it = params.begin(); it != params.end(); ++it ). More...
class  iterator
 Non const iterator support for the Dict object This is just a wrapper, everything is inherited from the map<string,EMObject>::iterator so the interface is the same as you would expect i.e for ( Dict::iterator it = params.begin(); it != params.end(); ++it ). More...


Detailed Description

Dict is a dictionary to store <string, EMObject> pair.

Typical ways to construct a Dict:

Dict d; d["lowpass"] = 12.23; float lowpass1 = d["lowpass"];

Dict d2("lowpass", 12.23);

You can iterate through a dict: for ( Dict::const_iterator it = params.begin(); it != params.end(); ++it ) { //do things to it } And similary use the Dict iterator as arguments to the generic algorithms that are feasible, such as copy.

You can find things in the iterator style: if( d.find("lowpass") != d.end() ) cout << "D has a lowpass key" << endl;\ Or like this if( d.has_key("lowpass") ) ...

A Dict has copy and assignment operators.

See the testing code in rt/emdata/test_emobject.cpp for prewritten testing code

Definition at line 376 of file emobject.h.


Constructor & Destructor Documentation

EMAN::Dict::Dict (  )  [inline]

Definition at line 379 of file emobject.h.

00380                 {
00381                 }

EMAN::Dict::Dict ( const string &  key1,
EMObject  val1 
) [inline]

Construct a Dict object from 1 key/value pair It's probably more conventional to intialize key/value pairs using operator[], but either approach is fine.

Definition at line 387 of file emobject.h.

References dict.

00388                 {
00389                         dict[key1] = val1;
00390                 }

EMAN::Dict::Dict ( const string &  key1,
EMObject  val1,
const string &  key2,
EMObject  val2 
) [inline]

Construct a Dict object from 2 key/value pairs.

Definition at line 394 of file emobject.h.

References dict.

00396                 {
00397                         dict[key1] = val1;
00398                         dict[key2] = val2;
00399                 }

EMAN::Dict::Dict ( const string &  key1,
EMObject  val1,
const string &  key2,
EMObject  val2,
const string &  key3,
EMObject  val3 
) [inline]

Construct a Dict object from 3 key/value pairs.

Definition at line 403 of file emobject.h.

References dict.

00406                 {
00407                         dict[key1] = val1;
00408                         dict[key2] = val2;
00409                         dict[key3] = val3;
00410                 }

EMAN::Dict::Dict ( const string &  key1,
EMObject  val1,
const string &  key2,
EMObject  val2,
const string &  key3,
EMObject  val3,
const string &  key4,
EMObject  val4 
) [inline]

Construct a Dict object from 4 key/value pairs.

Definition at line 414 of file emobject.h.

References dict.

00418                 {
00419                         dict[key1] = val1;
00420                         dict[key2] = val2;
00421                         dict[key3] = val3;
00422                         dict[key4] = val4;
00423                 }

EMAN::Dict::Dict ( const map< string, EMObject > &  d  )  [inline]

Construct a Dict object from a map object Calls the generic algorithm "copy".

Definition at line 428 of file emobject.h.

References copy(), and dict.

00429                 {
00430                         copy(d.begin(), d.end(), inserter(dict, dict.begin()));
00431                         // Or use
00432                         // dict.insert(d.begin(), d.end());
00433                 }

EMAN::Dict::~Dict (  )  [inline]

Destructor Performs no explicit action besides what the compiler automatically does.

Definition at line 438 of file emobject.h.

00438 {}

Dict::Dict ( const Dict that  ) 

Copy constructor Copies all elements in dict.

Definition at line 905 of file emobject.cpp.

00906 {
00907         *this = that;
00908 }


Member Function Documentation

Dict & Dict::operator= ( const Dict that  ) 

Assignment operator Copies all elements in dict.

Definition at line 910 of file emobject.cpp.

References begin(), copy(), dict, and end().

00911 {
00912         if ( this != &that )
00913         {
00914                 dict.clear();
00915                 copy(that.begin(), that.end(), inserter(dict, dict.begin()));
00916                 // or use this
00917                 // dict.insert( that.begin(), that.end());
00918         }
00919         else
00920         {
00921                 cerr << "Warning - attempted to assign a Dict object to itself. No action taken" << endl;
00922         }
00923 
00924         return *this;
00925 }

vector< string > EMAN::Dict::keys (  )  const [inline]

Get a vector containing all of the (string) keys in this dictionary.

Definition at line 452 of file emobject.h.

References dict.

Referenced by copy_keys_in(), EMAN::EMUtil::dump_dict(), EMAN::TestUtil::dump_emdata(), EMAN::EMData::rotate_translate(), EMAN::EMData::set_attr_dict(), and EMAN::TestUtil::test_dict().

00453                 {
00454                         vector < string > result;
00455 
00456                         map < string, EMObject >::const_iterator p;
00457                         for (p = dict.begin(); p != dict.end(); p++) {
00458                                 result.push_back(p->first);
00459                         }
00460 
00461                         return result;
00462                 }

vector< EMObject > EMAN::Dict::values (  )  const [inline]

Get a vector containing copies of each of the EMObjects in this dictionary.

Definition at line 466 of file emobject.h.

References dict.

Referenced by EMAN::EMUtil::dump_dict(), and EMAN::RealPixelProcessor::set_params().

00467                 {
00468                         vector < EMObject > result;
00469 
00470                         map < string, EMObject >::const_iterator p;
00471                         for (p = dict.begin(); p != dict.end(); p++) {
00472                                 result.push_back(p->second);
00473                         }
00474 
00475                         return result;
00476                 }

bool Dict::has_key_ci ( const string &  key  )  const

Ask the Dictionary if it as a particular key in a case insensitive way.

Parameters:
key the (string) key to find

Definition at line 1039 of file emobject.cpp.

References dict, and EMAN::Util::str_to_lower().

Referenced by EMAN::Transform::detect_problem_keys(), EMAN::Transform::set_params(), EMAN::Transform::set_params_inverse(), and EMAN::Transform::set_rotation().

01040 {
01041         string lower_key = Util::str_to_lower(key);
01042 
01043         for (map < string, EMObject >::const_iterator it = dict.begin(); it != dict.end(); ++it ) {
01044                 string lower = Util::str_to_lower(it->first);
01045                 if (lower == lower_key) return true;
01046         }
01047         return false;
01048 }

bool EMAN::Dict::has_key ( const string &  key  )  const [inline]

Ask the Dictionary if it as a particular key.

Parameters:
key the (string) key to find

Definition at line 486 of file emobject.h.

References dict.

Referenced by EMAN::Refine3DAligner::align(), EMAN::RefineAligner::align(), EMAN::TransformProcessor::assert_valid_aspect(), EMAN::PawelProjector::backproject3d(), EMAN::ChaoProjector::backproject3d(), 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(), EMAN::EMData::clip_inplace(), EMAN::DotCmp::cmp(), EMAN::SqEuclideanCmp::cmp(), EMAN::CccCmp::cmp(), copy_exclude_keys(), copy_exclusive_keys(), EMAN::SetSFProcessor::create_radial_func(), get(), EMAN::EMData::get_attr(), EMAN::EMData::get_attr_default(), EMAN::EMData::get_clip(), EMAN::EMData::get_ctf(), EMAN::InterpolatedFRC::init(), EMAN::NewFourierProcessor::preprocess(), EMAN::HighpassAutoPeakProcessor::preprocess(), EMAN::HighpassFourierProcessor::preprocess(), EMAN::LowpassFourierProcessor::preprocess(), EMAN::ScaleTransformProcessor::process(), EMAN::BinaryOperateProcessor< Type >::process_inplace(), EMAN::ScaleTransformProcessor::process_inplace(), EMAN::FFTProcessor::process_inplace(), EMAN::TestImageCylinder::process_inplace(), EMAN::TestImageNoiseGauss::process_inplace(), EMAN::TestImageNoiseUniformRand::process_inplace(), EMAN::TestImageEllipse::process_inplace(), EMAN::TestImageHollowEllipse::process_inplace(), EMAN::TestImageSinewave::process_inplace(), EMAN::TestImageSphericalWave::process_inplace(), EMAN::TestImageFourierNoiseProfile::process_inplace(), EMAN::CTFSNRWeightProcessor::process_inplace(), EMAN::AutoMask3DProcessor::process_inplace(), EMAN::AddRandomNoiseProcessor::process_inplace(), EMAN::AutoMask2DProcessor::process_inplace(), EMAN::AddNoiseProcessor::process_inplace(), EMAN::NormalizeToLeastSquareProcessor::process_inplace(), EMAN::GradientPlaneRemoverProcessor::process_inplace(), EMAN::ChaoProjector::project3d(), EMAN::FourierGriddingProjector::project3d(), EMAN::PawelProjector::project3d(), EMAN::EMData::read_image(), EMAN::EMData::scale_pixel(), EMAN::EMData::set_attr_dict(), set_default(), EMAN::PaintProcessor::set_params(), EMAN::MaskGaussNonuniformProcessor::set_params(), EMAN::CircularMaskProcessor::set_params(), EMAN::FiniteProcessor::set_params(), EMAN::HighpassFourierProcessor::set_params(), EMAN::LowpassFourierProcessor::set_params(), EMAN::KMeansAnalyzer::set_params(), EMAN::nnSSNR_ctfReconstructor::setup(), EMAN::nn4_ctfReconstructor::setup(), EMAN::nnSSNR_Reconstructor::setup(), EMAN::nn4Reconstructor::setup(), EMAN::TestUtil::to_emobject(), EMAN::SpiderIO::write_single_header(), EMAN::RT3DSphereAligner::xform_align_nbest(), and EMAN::RT3DGridAligner::xform_align_nbest().

00487                 {
00488                         map < string, EMObject >::const_iterator p = dict.find(key);
00489                         if (p != dict.end()) {
00490                                 return true;
00491                         }
00492                         return false;
00493                 }

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

EMObject EMAN::Dict::get ( const string &  key  )  const [inline]

Get the EMObject corresponding to the particular key Probably better to just use operator[].

Definition at line 505 of file emobject.h.

References dict, has_key(), key, LOGERR, and NotExistingObjectException.

Referenced by EMAN::file_store::add_image(), EMAN::CtfAverager::add_image(), EMAN::AutoMask2DProcessor::process_inplace(), EMAN::MeanZeroEdgeProcessor::process_inplace(), EMAN::EMData::rotate_translate(), EMAN::SigmaProcessor::set_params(), EMAN::RangeThresholdProcessor::set_params(), EMAN::ExpProcessor::set_params(), and EMAN::LinearXformProcessor::set_params().

00506                 {
00507                         if( has_key(key) ) {
00508                                 return dict[key];
00509                         }
00510                         else {
00511                                 LOGERR("No such key exist in this Dict");
00512                                 throw NotExistingObjectException("EMObject", "Nonexisting key (" + key + ") in Dict");
00513                         }
00514                 }

EMObject Dict::get_ci ( const string &  key  )  const

Get the EMObject corresponding to the particular key using case insensitivity.

Parameters:
key the key you want to check for in a case insensitive way

Definition at line 1027 of file emobject.cpp.

References dict, NotExistingObjectException, and EMAN::Util::str_to_lower().

Referenced by EMAN::Transform::set_params(), EMAN::Transform::set_params_inverse(), and EMAN::Transform::set_rotation().

01028 {
01029         string lower_key = Util::str_to_lower(key);
01030 
01031         for (map < string, EMObject >::const_iterator it = dict.begin(); it != dict.end(); ++it ) {
01032                 string lower = Util::str_to_lower(it->first);
01033                 if (lower == lower_key) return it->second;
01034         }
01035 
01036         throw NotExistingObjectException("EMObject", "Nonexisting key (" + key + ") in Dict");
01037 }

void EMAN::Dict::put ( const string &  key,
EMObject  val 
) [inline]

Put the value/key pair into the dictionary probably better to just use operator[].

Definition at line 523 of file emobject.h.

References dict.

Referenced by EMAN::MarchingCubes::get_isosurface(), and EMAN::SymSearchProcessor::process_inplace().

00524                 {
00525                         dict[key] = val;
00526                 }

void EMAN::Dict::erase ( const string &  key  )  [inline]

Remove a particular key.

Definition at line 530 of file emobject.h.

References dict.

Referenced by copy_exclude_keys(), and EMAN::EMData::del_attr().

00531                 {
00532                         dict.erase(key);
00533                 }

void EMAN::Dict::clear (  )  [inline]

Clear all keys wraps map.clear().

Definition at line 538 of file emobject.h.

References dict.

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

00539                 {
00540                         dict.clear();
00541                 }

template<typename type>
type EMAN::Dict::set_default ( const string &  key,
type  val 
) [inline]

Default setting behavior This can be achieved using a template - d.woolford Jan 2008 (before there was a function being written for every type).

Definition at line 547 of file emobject.h.

References dict, and has_key().

Referenced by EMAN::ImageAverager::add_image(), EMAN::OrientationGenerator::add_orientation(), EMAN::Refine3DAligner::align(), EMAN::RefineAligner::align(), EMAN::RTFSlowExhaustiveAligner::align(), EMAN::RTFExhaustiveAligner::align(), EMAN::RotateFlipAligner::align(), EMAN::RotateTranslateFlipAligner::align(), EMAN::RotateTranslateAligner::align(), EMAN::RotationalAligner::align(), EMAN::TranslationalAligner::align(), EMAN::FRCCmp::cmp(), EMAN::OptVarianceCmp::cmp(), EMAN::QuadMinDotCmp::cmp(), EMAN::TomoDotCmp::cmp(), EMAN::DotCmp::cmp(), EMAN::CccCmp::cmp(), EMAN::FourierReconstructor::determine_slice_agreement(), EMAN::BaldwinWoolfordReconstructor::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_nsym(), EMAN::OptimumOrientationGenerator::get_orientations_tally(), EMAN::SaffOrientationGenerator::get_orientations_tally(), EMAN::EvenOrientationGenerator::get_orientations_tally(), EMAN::EmanOrientationGenerator::get_orientations_tally(), EMAN::HSym::get_sym(), EMAN::DSym::get_sym(), EMAN::CSym::get_sym(), EMAN::BaldwinWoolfordReconstructor::insert_density_at(), EMAN::BaldwinWoolfordReconstructor::insert_pixel(), EMAN::HSym::is_in_asym_unit(), EMAN::DSym::is_in_asym_unit(), EMAN::CSym::is_in_asym_unit(), EMAN::BinarySkeletonizerProcessor::process(), EMAN::ScaleTransformProcessor::process(), EMAN::IntTranslateProcessor::process(), EMAN::DirectionalSumProcessor::process(), EMAN::BooleanShrinkProcessor::process(), EMAN::MeanShrinkProcessor::process(), EMAN::FFTResampleProcessor::process(), EMAN::MedianShrinkProcessor::process(), EMAN::NewHomomorphicTanhProcessor::process_inplace(), EMAN::NewHighpassTanhProcessor::process_inplace(), EMAN::NewLowpassTanhProcessor::process_inplace(), EMAN::ApplyPolynomialProfileToHelix::process_inplace(), EMAN::ModelEMCylinderProcessor::process_inplace(), EMAN::TomoTiltEdgeMaskProcessor::process_inplace(), EMAN::TomoTiltAngleWeightProcessor::process_inplace(), EMAN::ConvolutionProcessor::process_inplace(), EMAN::HistogramBin::process_inplace(), EMAN::NSigmaClampingProcessor::process_inplace(), EMAN::ClampingProcessor::process_inplace(), EMAN::ScaleTransformProcessor::process_inplace(), EMAN::IntTranslateProcessor::process_inplace(), EMAN::TestImageEllipse::process_inplace(), EMAN::TestImageHollowEllipse::process_inplace(), EMAN::TestImageCirclesphere::process_inplace(), EMAN::TestImageAxes::process_inplace(), EMAN::TestImageGradient::process_inplace(), EMAN::TestImageLineWave::process_inplace(), EMAN::CTFSNRWeightProcessor::process_inplace(), EMAN::TestImageFourierNoiseGaussian::process_inplace(), EMAN::AutoMask3D2Processor::process_inplace(), EMAN::PhaseToMassCenterProcessor::process_inplace(), EMAN::ToMassCenterProcessor::process_inplace(), EMAN::BinarizeFourierProcessor::process_inplace(), EMAN::NormalizeByMassProcessor::process_inplace(), EMAN::FlattenBackgroundProcessor::process_inplace(), EMAN::BooleanShrinkProcessor::process_inplace(), EMAN::MeanShrinkProcessor::process_inplace(), EMAN::FFTResampleProcessor::process_inplace(), EMAN::MedianShrinkProcessor::process_inplace(), EMAN::BoxStatProcessor::process_inplace(), EMAN::MaskSharpProcessor::set_params(), EMAN::InvertCarefullyProcessor::set_params(), EMAN::BaldwinWoolfordReconstructor::setup(), EMAN::FourierReconstructor::setup(), EMAN::FourierReconstructorSimple2D::setup(), EMAN::RT3DSphereAligner::xform_align_nbest(), EMAN::RT3DGridAligner::xform_align_nbest(), and EMAN::FourierReconstructor::zero_memory().

00548                 {
00549                         if (!has_key(key)) {
00550                                 dict[key] = val;
00551                         }
00552                         return dict[key];
00553                 }

Dict EMAN::Dict::copy_exclude_keys ( const vector< string > &  excluded_keys  )  const [inline]

Definition at line 555 of file emobject.h.

References erase(), and has_key().

00556                 {
00557                         Dict ret(*this);
00558 
00559                         for ( vector<string>::const_iterator it = excluded_keys.begin(); it != excluded_keys.end(); ++it ) {
00560                                 if (ret.has_key(*it)) ret.erase(*it);
00561                         }
00562 
00563                         return ret;
00564                 }

Dict EMAN::Dict::copy_exclusive_keys ( const vector< string > &  exclusive_keys  )  const [inline]

Definition at line 566 of file emobject.h.

References has_key().

Referenced by copy_keys_in().

00567                 {
00568                         Dict ret;
00569                         for ( vector<string>::const_iterator it = exclusive_keys.begin(); it != exclusive_keys.end(); ++it ) {
00570                                 if (has_key(*it)) ret[*it] = (*this)[*it];
00571                         }
00572 
00573                         return ret;
00574                 }

Dict EMAN::Dict::copy_keys_in ( const TypeDict tdict  )  const [inline]

Definition at line 576 of file emobject.h.

References copy_exclusive_keys(), EMAN::TypeDict::keys(), and keys().

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

00576                                                                  {
00577                         vector<string> keys = tdict.keys();
00578                         return copy_exclusive_keys(keys);
00579                 }

EMObject& EMAN::Dict::operator[] ( const string &  key  )  [inline]

Definition at line 581 of file emobject.h.

References dict.

00582                 {
00583 //                      static EMObject nullreturn;
00584 //                      if( has_key(key) )  return dict[key];
00585 //                      else return nullreturn;
00586 
00587 //                      if( has_key(key) ) {
00588                                 return dict[key];
00589 //                      }
00590 //                      else {
00591 //                              LOGERR("No such key exist in this Dict");
00592 //                              throw NotExistingObjectException("EMObject", "Nonexisting key (" + key + ") in Dict");
00593 //                      }
00594                 }

EMObject EMAN::Dict::operator[] ( const string &  key  )  const [inline]

Definition at line 596 of file emobject.h.

References dict.

00597                 {
00598 //                      if( has_key(key) )  return dict[key];
00599 //                      else return EMObject();
00600                         return dict[key];
00601 
00602 //                      else {
00603 //                              LOGERR("No such key exist in this Dict");
00604 //                              throw NotExistingObjectException("EMObject", "Nonexisting key (" + key + ") in Dict");
00605 //                      }
00606                 }

Dict::iterator Dict::begin ( void   ) 

Definition at line 944 of file emobject.cpp.

References dict.

Referenced by EMAN::Transform::detect_problem_keys(), EMAN::FactoryBase::insert_params(), operator=(), EMAN::Reconstructor::print_params(), and EMAN::InterpolatedFRC::set_params().

00945 {
00946         return iterator( dict.begin() );
00947 }

Dict::const_iterator Dict::begin ( void   )  const

Definition at line 949 of file emobject.cpp.

References dict.

00950 {
00951         return const_iterator( (map < string, EMObject >::const_iterator) dict.begin() );
00952 }

Dict::iterator Dict::end ( void   ) 

Dict::const_iterator Dict::end ( void   )  const

Definition at line 965 of file emobject.cpp.

References dict.

00966 {
00967         return const_iterator( (map < string, EMObject >::const_iterator)dict.end() );
00968 }

Dict::iterator Dict::find ( const string &  key  ) 

Definition at line 955 of file emobject.cpp.

References dict.

Referenced by EMAN::FourierPixelInserter3D::init(), and EMAN::InterpolatedFRC::init().

00956 {
00957         return iterator( dict.find(key) );
00958 }

Dict::const_iterator Dict::find ( const string &  key  )  const

Definition at line 970 of file emobject.cpp.

References dict.

00971 {
00972         return const_iterator( (map < string, EMObject >::const_iterator)dict.find(key) );
00973 }


Friends And Related Function Documentation

bool operator== ( const Dict d1,
const Dict d2 
) [friend]

Friend declaration operator== namespace EMAN2 operator== accesses private variables.

Definition at line 927 of file emobject.cpp.

00928 {
00929         // Just make use of map's version of operator==
00930         return (d1.dict == d2.dict);
00931 }

bool operator!= ( const Dict d1,
const Dict d2 
) [friend]

Friend declaration operator!= namespace EMAN2 operator!= accesses private variables.

Definition at line 933 of file emobject.cpp.

00934 {
00935         return !(d1 == d2);
00936 }


Member Data Documentation

map< string, EMObject > EMAN::Dict::dict [mutable, private]


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

Generated on Sat Nov 7 02:19:58 2009 for EMAN2 by  doxygen 1.5.6