]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Interface/Parameters.cxx
...
[cpPlugins.git] / lib / cpPlugins / Interface / Parameters.cxx
index 603aca9d421f69b15991286a37156b02ea9f4450..38a5f14af0b02729b9298d1290265e586cb20a51 100644 (file)
@@ -350,4 +350,144 @@ GetValueAsRealList( std::vector< TReal >& lst, const TString& name ) const
       lst.push_back( TReal( std::atof( token.c_str( ) ) ) );
 }
 
+// -------------------------------------------------------------------------
+bool cpPlugins::Interface::Parameters::
+HasStringValue( const TString& name ) const
+{
+  TParameters::const_iterator pIt = this->m_Parameters.find( name );
+  if( pIt != this->m_Parameters.end( ) )
+    return( pIt->second.first == Self::String );
+  return( false );
+}
+
+// -------------------------------------------------------------------------
+bool cpPlugins::Interface::Parameters::
+HasBoolValue( const TString& name ) const
+{
+  TParameters::const_iterator pIt = this->m_Parameters.find( name );
+  if( pIt != this->m_Parameters.end( ) )
+    return( pIt->second.first == Self::Bool );
+  return( false );
+}
+
+// -------------------------------------------------------------------------
+bool cpPlugins::Interface::Parameters::
+HasIntValue( const TString& name ) const
+{
+  TParameters::const_iterator pIt = this->m_Parameters.find( name );
+  if( pIt != this->m_Parameters.end( ) )
+    return( pIt->second.first == Self::Int );
+  return( false );
+}
+
+// -------------------------------------------------------------------------
+bool cpPlugins::Interface::Parameters::
+HasUintValue( const TString& name ) const
+{
+  TParameters::const_iterator pIt = this->m_Parameters.find( name );
+  if( pIt != this->m_Parameters.end( ) )
+    return( pIt->second.first == Self::Uint );
+  return( false );
+}
+
+// -------------------------------------------------------------------------
+bool cpPlugins::Interface::Parameters::
+HasRealValue( const TString& name ) const
+{
+  TParameters::const_iterator pIt = this->m_Parameters.find( name );
+  if( pIt != this->m_Parameters.end( ) )
+    return( pIt->second.first == Self::Real );
+  return( false );
+}
+
+// -------------------------------------------------------------------------
+bool cpPlugins::Interface::Parameters::
+HasIndexValue( const TString& name ) const
+{
+  TParameters::const_iterator pIt = this->m_Parameters.find( name );
+  if( pIt != this->m_Parameters.end( ) )
+    return( pIt->second.first == Self::Index );
+  return( false );
+}
+
+// -------------------------------------------------------------------------
+bool cpPlugins::Interface::Parameters::
+HasPointValue( const TString& name ) const
+{
+  TParameters::const_iterator pIt = this->m_Parameters.find( name );
+  if( pIt != this->m_Parameters.end( ) )
+    return( pIt->second.first == Self::Point );
+  return( false );
+}
+
+// -------------------------------------------------------------------------
+bool cpPlugins::Interface::Parameters::
+HasStringListValue( const TString& name ) const
+{
+  TParameters::const_iterator pIt = this->m_Parameters.find( name );
+  if( pIt != this->m_Parameters.end( ) )
+    return( pIt->second.first == Self::StringList );
+  return( false );
+}
+
+// -------------------------------------------------------------------------
+bool cpPlugins::Interface::Parameters::
+HasBoolListValue( const TString& name ) const
+{
+  TParameters::const_iterator pIt = this->m_Parameters.find( name );
+  if( pIt != this->m_Parameters.end( ) )
+    return( pIt->second.first == Self::BoolList );
+  return( false );
+}
+
+// -------------------------------------------------------------------------
+bool cpPlugins::Interface::Parameters::
+HasIntListValue( const TString& name ) const
+{
+  TParameters::const_iterator pIt = this->m_Parameters.find( name );
+  if( pIt != this->m_Parameters.end( ) )
+    return( pIt->second.first == Self::IntList );
+  return( false );
+}
+
+// -------------------------------------------------------------------------
+bool cpPlugins::Interface::Parameters::
+HasUintListValue( const TString& name ) const
+{
+  TParameters::const_iterator pIt = this->m_Parameters.find( name );
+  if( pIt != this->m_Parameters.end( ) )
+    return( pIt->second.first == Self::UintList );
+  return( false );
+}
+
+// -------------------------------------------------------------------------
+bool cpPlugins::Interface::Parameters::
+HasRealListValue( const TString& name ) const
+{
+  TParameters::const_iterator pIt = this->m_Parameters.find( name );
+  if( pIt != this->m_Parameters.end( ) )
+    return( pIt->second.first == Self::RealList );
+  return( false );
+}
+
+// -------------------------------------------------------------------------
+bool cpPlugins::Interface::Parameters::
+HasIndexListValue( const TString& name ) const
+{
+  TParameters::const_iterator pIt = this->m_Parameters.find( name );
+  if( pIt != this->m_Parameters.end( ) )
+    return( pIt->second.first == Self::IndexList );
+  return( false );
+}
+
+// -------------------------------------------------------------------------
+bool cpPlugins::Interface::Parameters::
+HasPointListValue( const TString& name ) const
+{
+  TParameters::const_iterator pIt = this->m_Parameters.find( name );
+  if( pIt != this->m_Parameters.end( ) )
+    return( pIt->second.first == Self::PointList );
+  return( false );
+}
+
 // eof - $RCSfile$