#ifndef REFLEX_BUILD
#define REFLEX_BUILD
#endif
#include "Reflex/PropertyListImpl.h"
#include "Reflex/Any.h"
#include <sstream>
static ROOT::Reflex::Any & sEmptyAny() {
static ROOT::Reflex::Any a;
return a;
}
std::ostream & ROOT::Reflex::operator<<( std::ostream & s,
const PropertyListImpl & p ) {
if ( p.fProperties ) {
for ( PropertyListImpl::Properties::const_iterator pIter = p.fProperties->begin();
pIter != p.fProperties->end(); ++pIter) {
s << pIter->first << " : " << pIter->second << std::endl;
}
}
return s;
}
void ROOT::Reflex::PropertyListImpl::ClearProperties() {
if ( fProperties ) delete fProperties;
fProperties = 0;
}
std::string ROOT::Reflex::PropertyListImpl::PropertyKeys() const {
std::string s = "";
if ( fProperties ) {
for(Properties::const_iterator pIter = fProperties->begin();
pIter != fProperties->end(); ) {
s += pIter->first;
if (++pIter != fProperties->end() ) { s += ", "; }
}
}
return s;
}
std::string
ROOT::Reflex::PropertyListImpl::PropertyAsString( const std::string & key ) const {
if ( fProperties && HasKey(key) ) {
std::ostringstream o;
o << PropertyValue(key);
return o.str();
}
return "";
}
ROOT::Reflex::Any &
ROOT::Reflex::PropertyListImpl::PropertyValue( const std::string & key ) const {
if ( fProperties ) return (*fProperties)[ key ];
return sEmptyAny();
}
ROOT page - Class index - Class Hierarchy - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.