execute();
}
-//=================================================================================================
-void CollectionAPI_Field::setComponentsNum(const ModelHighAPI_Integer& theNum)
-{
- fillAttribute(theNum, mycomponentsNum);
- execute();
-}
-
//=================================================================================================
void CollectionAPI_Field::setComponentsNames(const std::list<std::string>& theNames)
{
//=================================================================================================
void CollectionAPI_Field::setValuesType(const std::string& theType)
{
- fillAttribute(int(valueTypeByStr(theType)), myvaluesType);
myvalues->setType(valueTypeByStr(theType));
execute();
}
//=================================================================================================
void CollectionAPI_Field::setStepsNum(const ModelHighAPI_Integer& theSteps)
{
- fillAttribute(theSteps, mystepsNum);
mystamps->setSize(theSteps.intValue());
execute();
}
const ModelHighAPI_Integer& theStamp, \
const std::list<std::list<type> >& theComponents) \
{ \
- myvalues->setSize(myselection->size() + 1, \
- mycomponentsNum->value(), mystepsNum->value()); \
mystamps->setValue(theStepNum.intValue(), theStamp.intValue()); \
int aRowIndex = 0; \
std::list<std::list<type> >::const_iterator \
FeaturePtr aBase = feature();
const std::string& aDocName = theDumper.name(aBase->document());
- theDumper<<aBase<<" = model.addField("<<aDocName<<", "<<mystepsNum->value()<<", \""
- <<strByValueType(ModelAPI_AttributeTables::ValueType(myvaluesType->value()))<<"\", "
- <<mycomponentsNum->value()<<", ";
+ theDumper<<aBase<<" = model.addField("<<aDocName<<", "<<myvalues->tables()<<", \""
+ <<strByValueType(myvalues->type())<<"\", "<<mycomponentsNames->size()<<", ";
theDumper<<mycomponentsNames<<", ";
theDumper<<myselection<<")"<<std::endl;
// set values step by step
for(int aCol = 0; aCol < myvalues->columns(); aCol++) {
if (aCol != 0)
theDumper<<", ";
- switch(myvaluesType->value()) {
+ switch(myvalues->type()) {
case ModelAPI_AttributeTables::BOOLEAN:
theDumper<<myvalues->value(aRow, aCol, aStep).myBool;
break;
}
}
+std::shared_ptr<ModelAPI_AttributeTables> CollectionAPI_Field::tableValues()
+{
+ return myvalues;
+}
+
//=================================================================================================
FieldPtr addField(const std::shared_ptr<ModelAPI_Document>& thePart,
const ModelHighAPI_Integer& theStepsNum,
std::shared_ptr<CollectionAPI_Field> 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;
}