//--------------------------------------------------------- bool CSG_MetaData::Add_Property(const CSG_String &Name, const CSG_String &Value) { if( !Value.is_Empty() &&_Get_Property(Name) < 0 ) { m_Prop_Names .Add(Name ); m_Prop_Values.Add(Value); return( true ); } return( false ); }
//--------------------------------------------------------- void CParameters_Control::_Add_Property(wxPGProperty *pParent, CSG_Parameter *pParameter) { wxPGProperty *pProperty = _Get_Property(pParent, pParameter); if( pParameter->Get_Children_Count() > 0 ) { for(int i=0; i<pParameter->Get_Children_Count(); i++) { _Add_Property(pProperty, pParameter->Get_Child(i)); } m_pPG->Expand(pProperty); } }
//--------------------------------------------------------- bool CSG_MetaData::Set_Property(const CSG_String &Name, const CSG_String &Value, bool bAddIfNotExists) { int Index; if( (Index = _Get_Property(Name)) >= 0 ) { m_Prop_Values[Index] = Value; return( true ); } else if( bAddIfNotExists ) { m_Prop_Names .Add(Name); m_Prop_Values .Add(Value); return( true ); } return( false ); }