Use shared pointers for attribute systems.
This change makes common::Resource
and attribute::System
shared pointer classes.
Merge request reports
Activity
Errors:
- commit b66c877b is not allowed because the following files are not formatted according to the 'autopep8' check:
smtk/attribute/testing/python/basicAttributeDerivationTest.py
,smtk/attribute/testing/python/definitionDefaultValueTest.py
,smtk/io/testing/python/attributeReaderTest.py
,smtk/model/testing/python/modelAttributes.py
. UseDo: reformat
to rewrite the MR source branch automatically. - commit b66c877b is not allowed because the following files are not formatted according to the 'clang-format' check:
smtk/io/AttributeReader.h
,smtk/io/AttributeWriter.h
,smtk/io/SaveJSON.cxx
,smtk/io/testing/cxx/ResourceSetTest.cxx
,smtk/io/testing/cxx/ResourceSetWriterTest.cxx
, and 2 others. UseDo: reformat
to rewrite the MR source branch automatically.
Please rewrite commits to fix the errors listed above (adding fixup commits will not resolve the errors) and force-push the branch again to update the merge request.
- commit b66c877b is not allowed because the following files are not formatted according to the 'autopep8' check:
mentioned in merge request cmb!378 (merged)
added 5 commits
-
b66c877b...bc592617 - 4 commits from branch
cmb:master
- 71926e35 - Use shared pointers for attribute systems.
-
b66c877b...bc592617 - 4 commits from branch
Errors:
- commit 71926e35 is not allowed because the following files are not formatted according to the 'autopep8' check:
smtk/attribute/testing/python/basicAttributeDerivationTest.py
,smtk/attribute/testing/python/definitionDefaultValueTest.py
,smtk/io/testing/python/attributeReaderTest.py
,smtk/model/testing/python/modelAttributes.py
. UseDo: reformat
to rewrite the MR source branch automatically. - commit 71926e35 is not allowed because the following files are not formatted according to the 'clang-format' check:
smtk/common/Resource.h
,smtk/io/AttributeReader.h
,smtk/io/AttributeWriter.h
,smtk/io/SaveJSON.cxx
,smtk/io/testing/cxx/ResourceSetTest.cxx
, and 3 others. UseDo: reformat
to rewrite the MR source branch automatically.
Please rewrite commits to fix the errors listed above (adding fixup commits will not resolve the errors) and force-push the branch again to update the merge request.
- commit 71926e35 is not allowed because the following files are not formatted according to the 'autopep8' check:
Errors:
- commit 12366fed is not allowed because the following files are not formatted according to the 'autopep8' check:
smtk/attribute/testing/python/basicAttributeDerivationTest.py
,smtk/attribute/testing/python/definitionDefaultValueTest.py
,smtk/io/testing/python/attributeReaderTest.py
,smtk/model/testing/python/modelAttributes.py
. UseDo: reformat
to rewrite the MR source branch automatically. - commit 12366fed is not allowed because the following files are not formatted according to the 'clang-format' check:
smtk/common/Resource.h
,smtk/io/AttributeReader.h
,smtk/io/AttributeWriter.h
,smtk/io/SaveJSON.cxx
,smtk/io/testing/cxx/ResourceSetTest.cxx
, and 3 others. UseDo: reformat
to rewrite the MR source branch automatically.
Please rewrite commits to fix the errors listed above (adding fixup commits will not resolve the errors) and force-push the branch again to update the merge request.
- commit 12366fed is not allowed because the following files are not formatted according to the 'autopep8' check:
134 137 if smtk.wrappingProtocol() == 'pybind11': 135 test_system.setRefModelManager(model_manager) 136 options = smtk.attribute.System.CopyOptions.COPY_ASSOCIATIONS 137 test_system.copyAttribute(second_concrete, True) 138 test_system.copyAttribute(second_concrete, True, int(options)) 138 139 else: 139 test_system.setRefModelManager(model_manager) 140 141 # Copy SecondConcrete attribute 142 # Note: shiboken refuses to wrap smtk::attribute::System::CopyOptions enum, saying: 143 # enum 'smtk::model::Manager::CopyOptions' is specified in typesystem, but not declared 144 # Rather than trying to reason with shiboken, the options are specified 145 # numerically 146 options = 0x00000001 # should be smtk.attribute.System.CopyOptions.COPY_ASSOCIATIONS 147 test_system.copyAttribute(second_concrete, options) 140 test_system.copyAttribute(second_concrete, True, options) @tjcorona @john.tourtellott Could you please take a look at the changes to the
copyAttributeTest
? I think the original was broken and there may still be some enum bit-values out of sync. The issues are:- The
options
value was being ignored by both shiboken and pybind. - Passing in
smtk.attribute.System.CopyOptions.COPY_ASSOCIATIONS
fails because the options are passed unmodified tosmtk::attribute::Item::assign()
which expects a value fromsmtk.attribute.Item.AssignmentOptions
(which hasCOPY_MODEL_ASSOCIATIONS
).
I think I've fixed the test, but perhaps the enum values in
System
andItem
need to be harmonized.- The
28 28 { 29 29 // ---- 30 30 // I. First see how things work when System is not yet set. 31 attribute::System sys; 31 attribute::SystemPtr sysptr = attribute::System::create(); 32 attribute::System& sys(*sysptr.get()); mentioned in commit 2ceeea71