vrmlproc & togeom
 
Loading...
Searching...
No Matches
vrml_proc::conversion_context::Mergeable Class Referenceabstract

Interface defining a contract for the child classes. Subclass, or rather an instance of the class, has an ability to "merge" other instance into itself. More...

#include <Mergeable.hpp>

Inheritance diagram for vrml_proc::conversion_context::Mergeable:
vrml_proc::conversion_context::BaseConversionContext vrml_proc::conversion_context::BaseConversionContext vrml_proc::conversion_context::VectorConversionContext< to_geom::core::MeshTask > vrml_proc::conversion_context::VectorConversionContext< std::reference_wrapper< const vrml_proc::parser::model::Vec3fArray > > vrml_proc::conversion_context::VectorConversionContext< T > vrml_proc::conversion_context::VectorConversionContext< to_geom::core::MeshTask > vrml_proc::conversion_context::VectorConversionContext< std::reference_wrapper< const vrml_proc::parser::model::Vec3fArray > > vrml_proc::conversion_context::VectorConversionContext< T >

Public Member Functions

virtual ~Mergeable ()=default
 Virtual default destructor.
 
virtual void Merge (Mergeable *other)=0
 Pure virtual interface method. Merges the current object with another instance of the same type. The Merge method defines how the state or data of one object should be combined with another.
 

Detailed Description

Interface defining a contract for the child classes. Subclass, or rather an instance of the class, has an ability to "merge" other instance into itself.

Member Function Documentation

◆ Merge()

virtual void vrml_proc::conversion_context::Mergeable::Merge ( Mergeable * other)
pure virtual

Pure virtual interface method. Merges the current object with another instance of the same type. The Merge method defines how the state or data of one object should be combined with another.

Parameters
otherPointer to another Mergeable object, which should be of the same type as the current instance, which is to be merged.
Exceptions
std::invalid_argumentif the objects cannot be merged due to incompatibility.
Todo
Merge should not throw exception but return Result type identifying the issue occured

Implemented in vrml_proc::conversion_context::VectorConversionContext< T >, vrml_proc::conversion_context::VectorConversionContext< std::reference_wrapper< const vrml_proc::parser::model::Vec3fArray > >, vrml_proc::conversion_context::VectorConversionContext< std::reference_wrapper< const vrml_proc::parser::model::Vec3fArray > >, vrml_proc::conversion_context::VectorConversionContext< to_geom::core::MeshTask >, and vrml_proc::conversion_context::VectorConversionContext< to_geom::core::MeshTask >.


The documentation for this class was generated from the following file: