TuttleOFX  1
TuttleOFX/libraries/tuttle/src/tuttle/host/ofx/attribute/OfxhParamAccessor.cpp
Go to the documentation of this file.
00001 #include "OfxhParamAccessor.hpp"
00002 
00003 namespace tuttle {
00004 namespace host {
00005 namespace ofx {
00006 namespace attribute {
00007 
00008 OfxhParamAccessor::OfxhParamAccessor()
00009 {}
00010 
00011 OfxhParamAccessor::~OfxhParamAccessor() {}
00012 
00013 const std::string& OfxhParamAccessor::getParamType() const
00014 {
00015         return getProperties().getStringProperty( kOfxParamPropType );
00016 }
00017 
00018 std::string OfxhParamAccessor::getParamTypeName() const
00019 {
00020         static const std::string ofxPrefix = "OfxParamType";
00021         const std::string& type = getParamType();
00022         BOOST_ASSERT( type.size() > ofxPrefix.size() );
00023         return type.substr( ofxPrefix.size() );
00024 }
00025 
00026 const std::string& OfxhParamAccessor::getParentName() const
00027 {
00028         return getProperties().getStringProperty( kOfxParamPropParent );
00029 }
00030 
00031 const std::string& OfxhParamAccessor::getScriptName() const
00032 {
00033         return getProperties().getStringProperty( kOfxParamPropScriptName );
00034 }
00035 
00036 const std::string& OfxhParamAccessor::getHint() const
00037 {
00038         return getProperties().getStringProperty( kOfxParamPropHint, 0 );
00039 }
00040 
00041 const std::string& OfxhParamAccessor::getDoubleType() const
00042 {
00043         return getProperties().getStringProperty( kOfxParamPropDoubleType, 0 );
00044 }
00045 
00046 const std::string& OfxhParamAccessor::getCacheInvalidation() const
00047 {
00048         return getProperties().getStringProperty( kOfxParamPropCacheInvalidation, 0 );
00049 }
00050 
00051 bool OfxhParamAccessor::getEnabled() const
00052 {
00053         return getProperties().getIntProperty( kOfxParamPropEnabled, 0 ) != 0;
00054 }
00055 
00056 bool OfxhParamAccessor::getSecret() const
00057 {
00058         return getProperties().getIntProperty( kOfxParamPropSecret, 0 ) != 0;
00059 }
00060 
00061 bool OfxhParamAccessor::getEvaluateOnChange() const
00062 {
00063         return getProperties().getIntProperty( kOfxParamPropEvaluateOnChange, 0 ) != 0;
00064 }
00065 
00066 bool OfxhParamAccessor::getCanUndo() const
00067 {
00068         if( getProperties().hasProperty( kOfxParamPropCanUndo ) )
00069         {
00070                 return getProperties().getIntProperty( kOfxParamPropCanUndo ) != 0;
00071         }
00072         return false;
00073 }
00074 
00075 bool OfxhParamAccessor::getCanAnimate() const
00076 {
00077         if( getProperties().hasProperty( kOfxParamPropAnimates ) )
00078         {
00079                 return getProperties().getIntProperty( kOfxParamPropAnimates ) != 0;
00080         }
00081         return false;
00082 }
00083 
00084 }
00085 }
00086 }
00087 }
00088