X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FCollectionAPI%2FCollectionAPI_Field.cpp;h=072041e7715dda237b384f4140f5b15dd009227d;hb=b38bb339a84175749f2742d906db858e3377c86b;hp=4c8cd32649eda3e8cf93b0d369d3ffa4ed387eb4;hpb=fa502f7882cc1c782b63e936e36f061f6c7cf913;p=modules%2Fshaper.git diff --git a/src/CollectionAPI/CollectionAPI_Field.cpp b/src/CollectionAPI/CollectionAPI_Field.cpp index 4c8cd3264..072041e77 100644 --- a/src/CollectionAPI/CollectionAPI_Field.cpp +++ b/src/CollectionAPI/CollectionAPI_Field.cpp @@ -34,13 +34,6 @@ void CollectionAPI_Field::setSelection(const std::list& execute(); } -//================================================================================================= -void CollectionAPI_Field::setComponentsNum(const ModelHighAPI_Integer& theNum) -{ - fillAttribute(theNum, mycomponentsNum); - execute(); -} - //================================================================================================= void CollectionAPI_Field::setComponentsNames(const std::list& theNames) { @@ -51,7 +44,6 @@ void CollectionAPI_Field::setComponentsNames(const std::list& theNa //================================================================================================= void CollectionAPI_Field::setValuesType(const std::string& theType) { - fillAttribute(int(valueTypeByStr(theType)), myvaluesType); myvalues->setType(valueTypeByStr(theType)); execute(); } @@ -59,7 +51,6 @@ void CollectionAPI_Field::setValuesType(const std::string& theType) //================================================================================================= void CollectionAPI_Field::setStepsNum(const ModelHighAPI_Integer& theSteps) { - fillAttribute(theSteps, mystepsNum); mystamps->setSize(theSteps.intValue()); execute(); } @@ -77,8 +68,6 @@ void CollectionAPI_Field::addStep(const ModelHighAPI_Integer& theStepNum, \ const ModelHighAPI_Integer& theStamp, \ const std::list >& theComponents) \ { \ - myvalues->setSize(myselection->size() + 1, \ - mycomponentsNum->value(), mystepsNum->value()); \ mystamps->setValue(theStepNum.intValue(), theStamp.intValue()); \ int aRowIndex = 0; \ std::list >::const_iterator \ @@ -108,9 +97,8 @@ void CollectionAPI_Field::dump(ModelHighAPI_Dumper& theDumper) const FeaturePtr aBase = feature(); const std::string& aDocName = theDumper.name(aBase->document()); - theDumper<value()<<", \"" - <value()))<<"\", " - <value()<<", "; + theDumper<tables()<<", \"" + <type())<<"\", "<size()<<", "; theDumper<columns(); aCol++) { if (aCol != 0) theDumper<<", "; - switch(myvaluesType->value()) { + switch(myvalues->type()) { case ModelAPI_AttributeTables::BOOLEAN: theDumper<value(aRow, aCol, aStep).myBool; break; @@ -144,6 +132,11 @@ void CollectionAPI_Field::dump(ModelHighAPI_Dumper& theDumper) const } } +std::shared_ptr CollectionAPI_Field::tableValues() +{ + return myvalues; +} + //================================================================================================= FieldPtr addField(const std::shared_ptr& thePart, const ModelHighAPI_Integer& theStepsNum, @@ -156,9 +149,10 @@ FieldPtr addField(const std::shared_ptr& thePart, std::shared_ptr aField(new CollectionAPI_Field(aFeature)); aField->setStepsNum(theStepsNum); aField->setValuesType(theComponentType); - aField->setComponentsNum(theComponentsNum); aField->setComponentsNames(theComponentNames); aField->setSelection(theSelectionList); + aField->tableValues()->setSize( + int(theSelectionList.size() + 1), theComponentsNum, theStepsNum.intValue()); return aField; }