X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FCollectionAPI%2FCollectionAPI_Field.cpp;h=072041e7715dda237b384f4140f5b15dd009227d;hb=b38bb339a84175749f2742d906db858e3377c86b;hp=98110e8614372fb272e78498ad9f7d00b2f000c8;hpb=6aad2cb97127ef5663ff507d8e84b1c277c05a16;p=modules%2Fshaper.git diff --git a/src/CollectionAPI/CollectionAPI_Field.cpp b/src/CollectionAPI/CollectionAPI_Field.cpp index 98110e861..072041e77 100644 --- a/src/CollectionAPI/CollectionAPI_Field.cpp +++ b/src/CollectionAPI/CollectionAPI_Field.cpp @@ -44,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(); } @@ -52,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(); } @@ -70,8 +68,6 @@ void CollectionAPI_Field::addStep(const ModelHighAPI_Integer& theStepNum, \ const ModelHighAPI_Integer& theStamp, \ const std::list >& theComponents) \ { \ - myvalues->setSize(myselection->size() + 1, \ - mycomponentsNames->size(), mystepsNum->value()); \ mystamps->setValue(theStepNum.intValue(), theStamp.intValue()); \ int aRowIndex = 0; \ std::list >::const_iterator \ @@ -101,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()))<<"\", " - <size()<<", "; + 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; @@ -137,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, @@ -151,6 +151,8 @@ FieldPtr addField(const std::shared_ptr& thePart, aField->setValuesType(theComponentType); aField->setComponentsNames(theComponentNames); aField->setSelection(theSelectionList); + aField->tableValues()->setSize( + int(theSelectionList.size() + 1), theComponentsNum, theStepsNum.intValue()); return aField; }