Skip to content

Conversation

martinweismann
Copy link
Member

@martinweismann martinweismann commented Aug 25, 2022

Currently tests the RTTI feature of ACT which will be introduced by Autodesk/AutomaticComponentToolkit#182 .

With this change, the type of lib3mf-classes can be determined at runtime, e.g. like this:

auto resources = pModel->GetResources();
resources->MoveNext();
PResource pResource = resources->GetCurrent();
if (std::dynamic_pointer_cast<CObject>(pResource)) {
  std::cout << "first resource is Object" << std::endl;
}
if (std::dynamic_pointer_cast<CMeshObject>(pResource)) {
  std::cout << "first resource is MeshObject" << std::endl;
}

@martinweismann martinweismann changed the base branch from master to develop August 25, 2022 09:25
@codecov
Copy link

codecov bot commented Aug 25, 2022

Codecov Report

Merging #300 (cdf8b66) into develop (58af444) will increase coverage by 0.16%.
The diff coverage is 89.41%.

@@             Coverage Diff             @@
##           develop     #300      +/-   ##
===========================================
+ Coverage    71.46%   71.63%   +0.16%     
===========================================
  Files          419      419              
  Lines        23967    24138     +171     
===========================================
+ Hits         17129    17291     +162     
- Misses        6838     6847       +9     
Impacted Files Coverage Δ
Autogenerated/Source/lib3mf_interfaceexception.cpp 70.00% <ø> (ø)
Autogenerated/Source/lib3mf_interfaceexception.hpp 100.00% <ø> (ø)
Autogenerated/Source/lib3mf_interfacejournal.cpp 79.85% <ø> (ø)
Autogenerated/Source/lib3mf_types.hpp 19.56% <ø> (ø)
Include/API/lib3mf_base.hpp 100.00% <ø> (ø)
Include/API/lib3mf_basematerialgroupiterator.hpp 100.00% <ø> (ø)
Include/API/lib3mf_colorgroupiterator.hpp 100.00% <ø> (ø)
Include/API/lib3mf_componentsobjectiterator.hpp 100.00% <ø> (ø)
Include/API/lib3mf_compositematerialsiterator.hpp 100.00% <ø> (ø)
Include/API/lib3mf_meshobjectiterator.hpp 100.00% <ø> (ø)
... and 21 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@martinweismann martinweismann merged commit f55152b into develop Sep 1, 2022
@martinweismann martinweismann deleted the ACT_RTTI branch September 1, 2022 09:55
3dJan pushed a commit to 3dJan/lib3mf that referenced this pull request Apr 27, 2023
* Introduce ACT version with RTTI

* Fix iterators so the support RTTI
3dJan added a commit that referenced this pull request Apr 27, 2023
* Introduce ACT version with RTTI

* Fix iterators so the support RTTI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant