fw4spl
|
Visitor used to compare two objects. More...
#include <CompareObjects.hpp>
Public Types | |
typedef std::map< std::string, std::string > | PropsMapType |
Associates property path (within its parent object) to its value. | |
Public Member Functions | |
FWDATACAMP_API | CompareObjects () |
Constructor. | |
std::shared_ptr< ::fwData::Object > | getReferenceObject () const |
Returns the reference object. | |
std::shared_ptr< ::fwData::Object > | getComparedObject () const |
Returns the compared object. | |
const PropsMapType & | getReferenceProps () const |
Returns reference object properties. | |
const PropsMapType & | getComparedProps () const |
Returns compared object properties. | |
std::shared_ptr< PropsMapType > | getDifferences () const |
Returns the differences found between comparison of reference and compared objects. More... | |
FWDATACAMP_API void | compare (std::shared_ptr< ::fwData::Object > objRef, std::shared_ptr< ::fwData::Object > objComp) |
Process to the comparison between reference object and compared object. When the process completes, the differences found between the objects are accessible through ComparedObjects.getDifferences(). More... | |
Introspection methods implementation | |
FWDATACAMP_API void | visit (const camp::SimpleProperty &property) |
FWDATACAMP_API void | visit (const camp::EnumProperty &property) |
FWDATACAMP_API void | visit (const camp::UserProperty &property) |
FWDATACAMP_API void | visit (const camp::ArrayProperty &property) |
FWDATACAMP_API void | visit (const camp::Function &function) |
virtual FWDATACAMP_API void | visit (const camp::MapProperty &property) |
Public Member Functions inherited from camp::ExtendedClassVisitor | |
virtual void | visit (const Property &property) |
virtual void | visit (const SimpleProperty &property) |
virtual void | visit (const ArrayProperty &property) |
virtual void | visit (const EnumProperty &property) |
virtual void | visit (const UserProperty &property) |
virtual void | visit (const Function &function) |
Static Public Attributes | |
static FWDATACAMP_API const std::string | s_MISSING_PROPERTY |
Property value for differences map meaning a missing property. | |
Friends | |
struct | PropertyVisitor |
Visitor used to compare two objects.
Definition at line 30 of file CompareObjects.hpp.
void fwDataCamp::visitor::CompareObjects::compare | ( | std::shared_ptr< ::fwData::Object > | objRef, |
std::shared_ptr< ::fwData::Object > | objComp | ||
) |
Process to the comparison between reference object and compared object. When the process completes, the differences found between the objects are accessible through ComparedObjects.getDifferences().
objRef | data object marked as reference object in comparison |
objComp | data object marked as compared object to reference object |
fwCore::Exception | if classnames of reference and compared objects are different |
Definition at line 273 of file CompareObjects.cpp.
References fwData::Object::getClassname(), and SLM_ASSERT.
|
inline |
Returns the differences found between comparison of reference and compared objects.
Definition at line 86 of file CompareObjects.hpp.
References SPTR.