Commit c3e5b2a1 authored by Yumin Yuan's avatar Yumin Yuan
Browse files

Added MeshItem and phrases to typesystem.xml

parent da1a5ca9
......@@ -37,8 +37,8 @@ public:
std::size_t numberOfRequiredValues() const;
bool isExtensible() const;
bool setValue(const smtk::common::UUID&, const smtk::mesh::MeshSet&);
/// associated item with collection's meshes given \a collectionid and its \a meshset
bool setValue(const smtk::common::UUID& collectionid, const smtk::mesh::MeshSet& meshset);
bool appendValue(const smtk::common::UUID&, const smtk::mesh::MeshSet&);
void removeValue(const smtk::common::UUID&, const smtk::mesh::MeshSet&);
......
......@@ -25,8 +25,10 @@ public:
smtkSharedPtrCreateMacro(DescriptivePhrase);
Ptr setup(const std::vector<smtk::mesh::MeshSet>&,
DescriptivePhrase::Ptr parent = DescriptivePhrasePtr());
#ifndef SHIBOKEN_SKIP
Ptr setup(const std::vector<smtk::mesh::CollectionPtr>&,
DescriptivePhrase::Ptr parent = DescriptivePhrasePtr());
#endif
virtual ~MeshListPhrase() { }
virtual std::string title();
......
......@@ -23,7 +23,9 @@ public:
smtkTypeMacro(MeshPhrase);
smtkSharedPtrCreateMacro(DescriptivePhrase);
Ptr setup(const smtk::mesh::MeshSet& meshset, DescriptivePhrase::Ptr parent = DescriptivePhrasePtr());
#ifndef SHIBOKEN_SKIP
Ptr setup(const smtk::mesh::CollectionPtr& meshes, DescriptivePhrase::Ptr parent = DescriptivePhrasePtr());
#endif
virtual ~MeshPhrase() { }
virtual std::string title();
......
......@@ -332,6 +332,12 @@
<suppress-warning text="skipping function 'smtk::model::SubphraseGenerator::boundingCellsOfCell', unmatched parameter type 'smtk::model::DescriptivePhrase::Ptr'"/>
<suppress-warning text="skipping function 'smtk::model::EntityListPhrase::create', unmatched return type 'smtk::shared_ptr&lt;smtk::model::EntityListPhrase::SelfType&gt;'"/>
<suppress-warning text="skipping function 'smtk::model::EntityListPhrase::shared_from_this', unmatched return type 'smtk::shared_ptr&lt;smtk::model::EntityListPhrase::SelfType&gt;'"/>
<suppress-warning text="skipping function 'smtk::model::MeshPhrase::setup', unmatched return type 'smtk::model::MeshPhrase::Ptr'"/>
<suppress-warning text="skipping function 'smtk::model::MeshPhrase::shared_from_this', unmatched return type 'smtk::shared_ptr&lt;smtk::model::MeshPhrase::SelfType&gt;'"/>
<suppress-warning text="skipping function 'smtk::model::MeshPhrase::create', unmatched return type 'smtk::shared_ptr&lt;smtk::model::MeshPhrase::SelfType&gt;'"/>
<suppress-warning text="skipping function 'smtk::model::MeshListPhrase::setup', unmatched return type 'smtk::model::MeshListPhrase::Ptr'"/>
<suppress-warning text="skipping function 'smtk::model::MeshListPhrase::create', unmatched return type 'smtk::shared_ptr&lt;smtk::model::MeshListPhrase::SelfType&gt;'"/>
<suppress-warning text="skipping function 'smtk::model::MeshListPhrase::shared_from_this', unmatched return type 'smtk::shared_ptr&lt;smtk::model::EntityListPhrase::SelfType&gt;'"/>
<suppress-warning text="skipping field 'DescriptivePhrase::m_delegate' with unmatched type 'smtk::shared_ptr&lt;SubphraseGenerator&gt;'"/>
<suppress-warning text="skipping function 'smtk::attribute::ValueItemTemplate::setValue', unmatched parameter type 'size_t'"/>
<suppress-warning text="skipping function 'smtk::attribute::ValueItemTemplate::concreteDefinition', unmatched return type 'shared_ptr&lt;const smtk::attribute::ValueItemTemplate&lt;DataT&gt;::DefType&gt;"/>
......@@ -432,6 +438,12 @@
<suppress-warning text="skipping function 'smtk::attribute::MeshSelectionItem::end', unmatched return type 'smtk::attribute::MeshSelectionItem::const_sel_map_it'"/>
<suppress-warning text="skipping function 'smtk::attribute::MeshSelectionItem::copyFrom', unmatched parameter type 'smtk::attribute::Item::CopyInfo&amp;'"/>
<suppress-warning text="skipping function 'smtk::attribute::MeshSelectionItem::begin', unmatched return type 'smtk::attribute::MeshSelectionItem::const_sel_map_it'"/>
<suppress-warning text="skipping function 'smtk::attribute::Attribute::findMesh', unmatched return type 'smtk::attribute::ConstMeshItemPtr'"/>
<suppress-warning text="skipping function 'smtk::attribute::Attribute::findMesh', unmatched return type 'smtk::attribute::MeshItemPtr'"/>
<suppress-warning text="skipping function 'smtk::model::Operator::findMesh', unmatched return type 'smtk::attribute::MeshItemPtr'"/>
<suppress-warning text="skipping function 'smtk::attribute::MeshItem::end', unmatched return type 'smtk::attribute::MeshItem::const_mesh_it'"/>
<suppress-warning text="skipping function 'smtk::attribute::MeshItem::copyFrom', unmatched parameter type 'smtk::attribute::Item::CopyInfo&amp;'"/>
<suppress-warning text="skipping function 'smtk::attribute::MeshItem::begin', unmatched return type 'smtk::attribute::MeshItem::const_mesh_it'"/>
@EXTRA_TYPESYSTEMS@
......@@ -754,6 +766,8 @@
<value-type template="smtk::shared_ptr" args="smtk::model::DescriptivePhrase"/>
<value-type template="smtk::shared_ptr" args="smtk::model::EntityPhrase"/>
<value-type template="smtk::shared_ptr" args="smtk::model::EntityListPhrase"/>
<value-type template="smtk::shared_ptr" args="smtk::model::MeshPhrase"/>
<value-type template="smtk::shared_ptr" args="smtk::model::MeshListPhrase"/>
<value-type template="smtk::shared_ptr" args="smtk::model::SubphraseGenerator"/>
<value-type template="smtk::shared_ptr" args="smtk::model::SimpleModelSubphrases"/>
<value-type template="smtk::shared_ptr" args="smtk::model::Operator">
......@@ -1022,6 +1036,8 @@
<value-type template="smtk::shared_ptr" args="smtk::attribute::ModelEntityItemDefinition" />
<value-type template="smtk::shared_ptr" args="smtk::attribute::MeshSelectionItem" />
<value-type template="smtk::shared_ptr" args="smtk::attribute::MeshSelectionItemDefinition" />
<value-type template="smtk::shared_ptr" args="smtk::attribute::MeshItem" />
<value-type template="smtk::shared_ptr" args="smtk::attribute::MeshItemDefinition" />
<value-type template="smtk::shared_ptr" args="smtk::attribute::System">
<modify-function signature="findAttributes(const std::string &amp;, std::vector&lt;smtk::shared_ptr&lt;smtk::attribute::Attribute&gt; &gt; &amp;)">
<modify-argument index="2">
......@@ -1262,6 +1278,38 @@
</add-function>
</object-type>
<object-type name="MeshPhrase">
<include file-name="smtk/model/MeshPhrase.h" location="local"/>
<add-function signature="create()"
static="yes"
return-type="smtk::shared_ptr&lt;smtk::model::MeshPhrase&gt;">
<inject-code>
%RETURN_TYPE %0 = smtk::model::MeshPhrase::create();
%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0);
</inject-code>
</add-function>
</object-type>
<object-type name="MeshListPhrase">
<include file-name="smtk/model/MeshListPhrase.h" location="local"/>
<add-function signature="create()"
static="yes"
return-type="smtk::shared_ptr&lt;smtk::model::MeshListPhrase&gt;">
<inject-code>
%RETURN_TYPE %0 = smtk::model::MeshListPhrase::create();
%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0);
</inject-code>
</add-function>
<add-function signature="setup(const std::vector&lt;smtk::model::EntityRef&gt;&amp;)"
return-type="smtk::shared_ptr&lt;smtk::model::MeshListPhrase&gt;">
<inject-code>
smtk::model::DescriptivePhrasePtr invalid;
%RETURN_TYPE %0 = %CPPSELF-&gt;setup(%1, invalid);
%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0);
</inject-code>
</add-function>
</object-type>
<value-type name="Face" hash-function="smtk::model::entityrefHash">
<include file-name="smtk/model/Face.h" location="local"/>
<modify-function signature="isValid(smtk::model::Entity**) const" remove="all"/>
......@@ -1953,6 +2001,39 @@
</add-function>
</object-type>
<object-type name="MeshItem">
<include file-name="smtk/attribute/MeshItem.h" location="local" />
<add-function signature="CastTo(smtk::shared_ptr&lt;smtk::attribute::Item &gt; &amp;)"
static="yes"
return-type="smtk::shared_ptr&lt;smtk::attribute::MeshItem &gt;">
<inject-code>
%RETURN_TYPE %0 = smtk::dynamic_pointer_cast&lt;smtk::attribute::MeshItem &gt;(%1);
%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0);
</inject-code>
</add-function>
</object-type>
<object-type name="MeshItemDefinition">
<include file-name="smtk/attribute/MeshItemDefinition.h" location="local" />
<modify-function signature="MeshItemDefinition(const std::string &amp;)" access="private" />
<add-function signature="ToItemDefinition(const smtk::shared_ptr&lt;smtk::attribute::MeshItemDefinition &gt;)"
static="yes"
return-type="smtk::shared_ptr&lt;smtk::attribute::ItemDefinition &gt;">
<inject-code>
%RETURN_TYPE %0 = smtk::dynamic_pointer_cast&lt;smtk::attribute::ItemDefinition &gt;(%1);
%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0);
</inject-code>
</add-function>
<add-function signature="CastTo(smtk::shared_ptr&lt;smtk::attribute::ItemDefinition &gt; &amp;)"
static="yes"
return-type="smtk::shared_ptr&lt;smtk::attribute::MeshItemDefinition &gt;">
<inject-code>
%RETURN_TYPE %0 = smtk::dynamic_pointer_cast&lt;smtk::attribute::MeshItemDefinition &gt;(%1);
%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](%0);
</inject-code>
</add-function>
</object-type>
<object-type name="MeshSelectionItem">
<include file-name="smtk/attribute/MeshSelectionItem.h" location="local" />
<add-function signature="CastTo(smtk::shared_ptr&lt;smtk::attribute::Item &gt; &amp;)"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment