ISIS Core Library 0.7.2 (api 3.0.0)

/scr/tee1/isis/lib/Core/CoreUtils/property.cpp

Go to the documentation of this file.
00001 //
00002 // C++ Implementation: property
00003 //
00004 // Description:
00005 //
00006 //
00007 // Author: Enrico Reimer<reimer@cbs.mpg.de>, (C) 2009
00008 //
00009 // Copyright: See COPYING file that comes with this distribution
00010 //
00011 //
00012 
00013 #include "property.hpp"
00014 
00015 namespace isis
00016 {
00017 namespace util
00018 {
00019 
00020 bool &PropertyValue::needed() { return m_needed;}
00021 bool PropertyValue::isNeeded()const { return m_needed;}
00022 
00023 
00024 bool PropertyValue::operator== ( const util::PropertyValue &second )const
00025 {
00026     return !second.isEmpty() && operator==( *second );
00027 }
00028 bool PropertyValue::operator!= ( const util::PropertyValue &second )const
00029 {
00030     return !( ( second.isEmpty() && isEmpty() ) || operator==( second ) );
00031 }
00032 
00033 
00034 bool PropertyValue::operator== ( const ValueBase &second )const
00035 {
00036     return !isEmpty() && get()->operator==( second );
00037 }
00038 
00039 
00040 PropertyValue::PropertyValue ( ) : m_needed( false ) {}
00041 
00042 std::string PropertyValue::getTypeName() const
00043 {
00044     LOG_IF( !*this, Debug, error ) << "Doing getTypeName on empty property, this will crash";
00045     return ( **this ).getTypeName();
00046 }
00047 
00048 short unsigned int PropertyValue::getTypeID() const
00049 {
00050     LOG_IF( !*this, Debug, error ) << "Doing getTypeID on empty property, this will crash";
00051     return ( **this ).getTypeID();
00052 }
00053 
00054 }
00055 }