ADTF
|
Utility class to compare data descriptions. More...
Public Types | |
enum | DescriptionCheckFlags { dcf_data_types = 0x01 , dcf_units = 0x02 , dcf_enums = 0x04 , dcf_structs = 0x08 , dcf_streams = 0x10 , dcf_base_units = 0x20 , dcf_prefixes = 0x40 , dcf_stream_meta_types = 0x80 , dcf_all = 0xFF , dcf_subset = 0x0100 , dcf_versions = 0x0200 , dcf_comments = 0x0400 , dcf_descriptions = 0x0800 , dcf_header = 0x1000 , dcf_visualization_attributes , dcf_no_enum_values_check = 0x010000 , dcf_no_recursion , dcf_no_header_dates , dcf_everything = 0xFFFF } |
Flags for the description based isEqual methods. More... | |
enum | ItemCheckFlags { icf_none = 0x00 , icf_memory = 0x01 , icf_serialized = 0x02 , icf_names , icf_versions , icf_units = 0x10 , icf_comments = 0x20 , icf_descriptions = 0x40 , icf_subset = 0x80 , icf_visualizations_attributes , icf_no_enum_values_check = 0x0200 , icf_no_recursion , icf_everything } |
Flags for the item based isEqual methods. More... | |
Static Public Member Functions | |
static a_util::result::Result | isBinaryEqual (const std::string &type1, const std::string &desc1, const std::string &type2, const std::string &desc2, bool is_subset=true) |
isBinaryEqual checks whether two type descriptions describe the same binary data layout in deserialized ddl::DataRepresentation. More... | |
static a_util::result::Result | isBinaryEqual (const std::string &type1, const std::string &desc1, ddl::DataRepresentation rep1, const std::string &type2, const std::string &desc2, ddl::DataRepresentation rep2, bool is_subset=true) |
isBinaryEqual checks whether two type descriptions describe the same binary data layout. More... | |
static a_util::result::Result | isBinaryEqual (const std::string &type1, const dd::DataDefinition &desc1, const std::string &type2, const dd::DataDefinition &desc2, bool is_subset=true) |
isBinaryEqual checks whether two type descriptions describe the same binary data layout in deserialized ddl::DataRepresentation. More... | |
static a_util::result::Result | isBinaryEqual (const std::string &type1, const dd::DataDefinition &desc1, ddl::DataRepresentation rep1, const std::string &type2, const dd::DataDefinition &desc2, ddl::DataRepresentation rep2, bool is_subset=true) |
isBinaryEqual checks whether two type descriptions describe the same binary data layout. More... | |
static a_util::result::Result | isEqualPrefix (const std::string &prefix1, const std::string &desc1, const std::string &prefix2, const std::string &desc2, uint32_t flags=icf_none) |
isEqualPrefix checks whether two prefix descriptions are equal. More... | |
static a_util::result::Result | isEqual (const dd::UnitPrefix &prefix1, const dd::UnitPrefix &prefix2, uint32_t flags=icf_none) |
isEqual checks whether two prefix descriptions are equal. More... | |
static a_util::result::Result | isEqualUnit (const std::string &unit1, const std::string &desc1, const std::string &unit2, const std::string &desc2, uint32_t flags=icf_none) |
isEqualUnit checks whether two unit descriptions are equal. More... | |
static a_util::result::Result | isEqual (const dd::Unit &unit1, const dd::DataDefinition &source_dd_of_unit1, const dd::Unit &unit2, const dd::DataDefinition &source_dd_of_unit2, uint32_t flags=icf_none) |
isEqual checks whether two unit descriptions are equal. More... | |
static a_util::result::Result | isEqual (const dd::BaseUnit &base_unit1, const dd::BaseUnit &base_unit2, uint32_t flags=icf_none) |
isEqual checks whether two unit descriptions are equal. More... | |
static a_util::result::Result | isEqualType (const std::string &type1, const std::string &desc1, const std::string &type2, const std::string &desc2, uint32_t flags=icf_memory) |
isEqual checks whether two type (POD/enum/struct) descriptions are equal. More... | |
static a_util::result::Result | isEqual (const dd::DataType &type1, const dd::DataType &type2, uint32_t flags=icf_memory) |
isEqual checks whether two type (POD) descriptions are equal When this is true for a struct then it also implies isBinaryEqual is true More... | |
static a_util::result::Result | isEqual (const dd::EnumType &enum1, const dd::DataDefinition &source_dd_of_enum1, const dd::EnumType &enum2, const dd::DataDefinition &source_dd_of_enum2, uint32_t flags=icf_memory) |
isEqual checks whether two type (enum) descriptions are equal When this is true for a struct then it also implies isBinaryEqual is true More... | |
static a_util::result::Result | isEqual (const dd::StructType &type1, const dd::DataDefinition &source_dd_of_type1, const dd::StructType &type2, const dd::DataDefinition &source_dd_of_type2, uint32_t flags=icf_memory) |
isEqual checks whether two type (POD/enum/struct) descriptions are equal When this is true for a struct then it also implies isBinaryEqual is true More... | |
static a_util::result::Result | isEqualStream (const std::string &stream1, const std::string &desc1, const std::string &stream2, const std::string &desc2, uint32_t flags=icf_memory) |
isEqual checks whether two stream descriptions are equal. More... | |
static a_util::result::Result | isEqual (const dd::Stream &stream1, const dd::DataDefinition &source_dd_of_stream1, const dd::Stream &stream2, const dd::DataDefinition &source_dd_of_stream2, uint32_t flags=icf_memory) |
isEqual checks whether two stream descriptions are equal. More... | |
static a_util::result::Result | isEqual (const dd::StreamMetaType &stream_meta_type1, const dd::DataDefinition &source_dd_of_stream_meta_type1, const dd::StreamMetaType &stream_meta_type2, const dd::DataDefinition &source_dd_of_stream_meta_type2, uint32_t flags=icf_memory) |
isEqual checks whether two stream meta types descriptions are equal. More... | |
static a_util::result::Result | isEqual (const dd::datamodel::KeyValuePair &key_value_pair1, const dd::datamodel::KeyValuePair &key_value_pair2, uint32_t flags=icf_none) |
isEqual checks whether two external declarations of header/elements of enum/properties of streammetatype properties are equal. More... | |
static a_util::result::Result | isEqual (const dd::Unit::RefUnit &ref_unit1, const dd::DataDefinition &source_dd_of_ref_unit1, const dd::Unit::RefUnit &ref_unit2, const dd::DataDefinition &source_dd_of_ref_unit2, uint32_t flags=icf_none) |
isEqual checks whether two reference units are equal. More... | |
static a_util::result::Result | isEqual (const dd::StructType::Element &elem1, const dd::DataDefinition &source_dd_of_elem1, const dd::StructType::Element &elem2, const dd::DataDefinition &source_dd_of_elem2, uint32_t flags=icf_none) |
isEqual checks whether two struct elements are equal. More... | |
static a_util::result::Result | isEqual (const dd::Stream::Struct &stream_struct1, const dd::DataDefinition &source_dd_of_stream_struct1, const dd::Stream::Struct &stream_struct2, const dd::DataDefinition &source_dd_of_stream_struct2, uint32_t flags=icf_none) |
isEqual checks whether two stream structs equal. More... | |
static a_util::result::Result | isEqual (const std::string &desc1, const std::string &desc2, uint32_t flags=dcf_all|dcf_subset) |
isEqual checks whether two descriptions are equal. More... | |
static a_util::result::Result | isEqual (const dd::DataDefinition &desc1, const dd::DataDefinition &desc2, uint32_t flags=dcf_all|dcf_subset) |
isEqual checks whether two descriptions are equal. More... | |
Utility class to compare data descriptions.
Definition at line 25 of file ddcompare.h.
Flags for the description based isEqual methods.
Definition at line 30 of file ddcompare.h.
enum ItemCheckFlags |
Flags for the item based isEqual methods.
Definition at line 59 of file ddcompare.h.
|
static |
isBinaryEqual checks whether two type descriptions describe the same binary data layout in deserialized
ddl::DataRepresentation.
[in] | type1 | The name of the first type. |
[in] | desc1 | The description that contains type1 . |
[in] | type2 | The name of the second type. |
[in] | desc2 | The description that contains type2 . |
[in] | is_subset | If true then the method checks if the first type is a subset of the second. A subset is defined as follows:
|
a_util::result::SUCCESS | The description describe the same layout |
ERR_FAILED | The description do NOT describe the same layout |
Standard | result (other DataDefinition parsing errors etc.) |
|
static |
isBinaryEqual checks whether two type descriptions describe the same binary data layout.
It compares their offsets and sizes and byteorder depending on the given respresentations within rep1
and rep2
.
[in] | type1 | The name of the first type. |
[in] | desc1 | The description contains type1. |
[in] | rep1 | The representaion of first type1. |
[in] | type2 | The name of the second type. |
[in] | desc2 | The description contains type2. |
[in] | rep2 | The representaion of second type2. |
[in] | is_subset | If true then the method checks if the first type is a subset of the second. A subset is defined as follows:
|
a_util::result::SUCCESS | The description describe the same layout |
ERR_FAILED | The description do NOT describe the same layout |
Standard | result (other DataDefinition parsing errors etc.) |
|
static |
isBinaryEqual checks whether two type descriptions describe the same binary data layout in deserialized
ddl::DataRepresentation.
[in] | type1 | The name of the first type. |
[in] | desc1 | The description that contains type1 . |
[in] | type2 | The name of the second type. |
[in] | desc2 | The description that contains type2 . |
[in] | is_subset | If true then the method checks if the first type is a subset of the second. A subset is defined as follows:
|
a_util::result::SUCCESS | The description describe the same layout |
ERR_FAILED | The description do NOT describe the same layout |
Standard | result (other DataDefinition parsing errors etc.) |
|
static |
isBinaryEqual checks whether two type descriptions describe the same binary data layout.
It compares their offsets and sizes and byteorder depending on the given respresentations within rep1
and rep2
.
[in] | type1 | The name of the first type1. |
[in] | desc1 | The description that contains type1 . |
[in] | rep1 | The data representation of type1. |
[in] | type2 | The name of the second type. |
[in] | desc2 | The description that contains type2 . |
[in] | rep2 | The data representation of type2 . |
[in] | is_subset | If true then the method checks if the first type is a subset of the second. A subset is defined as follows:
|
a_util::result::SUCCESS | The description describe the same layout |
ERR_FAILED | The description do NOT describe the same layout |
Standard | result (other DataDefinition parsing errors etc.) |
|
static |
isEqual checks whether two unit descriptions are equal.
[in] | base_unit1 | The first unit. |
[in] | base_unit2 | The second unit. |
[in] | flags | Flags that specifiy what should be checked, see ItemCheckFlags. |
a_util::result::SUCCESS | The descriptions are equal. |
ERR_FAILED | The description are not equal. |
Standard | result (other DataDefinition parsing errors etc.) |
|
static |
isEqual checks whether two descriptions are equal.
[in] | desc1 | The first description. |
[in] | desc2 | The second description. |
[in] | flags | Flags that specifiy what should be checked, see DescriptionCheckFlags. |
a_util::result::SUCCESS | The descriptions are equal. |
ERR_FAILED | The description are not equal. |
Standard | result (other DataDefinition parsing errors etc.) |
|
static |
isEqual checks whether two external declarations of header/elements of enum/properties of streammetatype properties are equal.
[in] | key_value_pair1 | The first key value pair. |
[in] | key_value_pair2 | The second key value pair. |
[in] | flags | Flags that specifiy what should be checked, see ItemCheckFlags. |
a_util::result::SUCCESS | The descriptions are equal. |
ERR_FAILED | The description are not equal. |
Standard | result (other DataDefinition parsing errors etc.) |
|
static |
isEqual checks whether two type (POD) descriptions are equal When this is true for a struct then it also implies isBinaryEqual is true
[in] | type1 | The first type. |
[in] | type2 | The second type. |
[in] | flags | Flags that specifiy what should be checked, see ItemCheckFlags. |
a_util::result::SUCCESS | The descriptions are equal. |
ERR_FAILED | The description are not equal. |
Standard | result (other DataDefinition parsing errors etc.) |
|
static |
isEqual checks whether two type (enum) descriptions are equal When this is true for a struct then it also implies isBinaryEqual is true
[in] | enum1 | The first type. |
[in] | source_dd_of_enum1 | The DataDefinition where all references of type1 are defined |
[in] | enum2 | The second type. |
[in] | source_dd_of_enum2 | The DataDefinition where all references of type2 are defined |
[in] | flags | Flags that specifiy what should be checked, see ItemCheckFlags. |
a_util::result::SUCCESS | The descriptions are equal. |
ERR_FAILED | The description are not equal. |
Standard | result (other DataDefinition parsing errors etc.) |
|
static |
isEqual checks whether two stream descriptions are equal.
[in] | stream1 | The first stream. |
[in] | source_dd_of_stream1 | The DataDefinition where all references of stream1 are defined |
[in] | stream2 | The second stream. |
[in] | source_dd_of_stream2 | The DataDefinition where all references of stream2 are defined |
[in] | flags | Flags that specifiy what should be checked, see ItemCheckFlags. |
a_util::result::SUCCESS | The descriptions are equal. |
ERR_FAILED | The description are not equal. |
Standard | result (other DataDefinition parsing errors etc.) |
|
static |
isEqual checks whether two stream structs equal.
[in] | stream_struct1 | The first struct. |
[in] | source_dd_of_stream_struct1 | The corresponding DataDefinition for the first struct. |
[in] | stream_struct2 | The second struct. |
[in] | source_dd_of_stream_struct2 | The corresponding DataDefinition for the second struct. |
[in] | flags | Flags that specifiy what should be checked, see ItemCheckFlags. |
a_util::result::SUCCESS | The descriptions are equal. |
ERR_FAILED | The description are not equal. |
Standard | result (other DataDefinition parsing errors etc.) |
|
static |
isEqual checks whether two stream meta types descriptions are equal.
[in] | stream_meta_type1 | The first stream meta type. |
[in] | source_dd_of_stream_meta_type1 | The DataDefinition where all references of stream_meta_type1 are defined |
[in] | stream_meta_type2 | The second stream meta type. |
[in] | source_dd_of_stream_meta_type2 | The DataDefinition where all references of stream_meta_type2 are defined |
[in] | flags | Flags that specifiy what should be checked, see ItemCheckFlags. |
a_util::result::SUCCESS | The descriptions are equal. |
ERR_FAILED | The description are not equal. |
Standard | result (other DataDefinition parsing errors etc.) |
|
static |
isEqual checks whether two type (POD/enum/struct) descriptions are equal When this is true for a struct then it also implies isBinaryEqual is true
[in] | type1 | The first type. |
[in] | source_dd_of_type1 | The DataDefinition where all references of type1 are defined |
[in] | type2 | The second type. |
[in] | source_dd_of_type2 | The DataDefinition where all references of type2 are defined |
[in] | flags | Flags that specifiy what should be checked, see ItemCheckFlags. |
a_util::result::SUCCESS | The descriptions are equal. |
ERR_FAILED | The description are not equal. |
Standard | result (other DataDefinition parsing errors etc.) |
|
static |
isEqual checks whether two struct elements are equal.
Note that in case of dynamic elements only the name of the array size specifier can be checked. Compare the whole struct if you need a more tourough comparison.
[in] | elem1 | The first element. |
[in] | source_dd_of_elem1 | The DataDefinition where all references of elem1 are defined |
[in] | elem2 | The second element. |
[in] | source_dd_of_elem2 | The DataDefinition where all references of elem2 are defined |
[in] | flags | Flags that specifiy what should be checked, see ItemCheckFlags. |
a_util::result::SUCCESS | The descriptions are equal. |
ERR_FAILED | The description are not equal. |
Standard | result (other DataDefinition parsing errors etc.) |
|
static |
isEqual checks whether two unit descriptions are equal.
[in] | unit1 | The first unit. |
[in] | source_dd_of_unit1 | The DataDefinition unit1 belongs to. |
[in] | unit2 | The second unit. |
[in] | source_dd_of_unit2 | The DataDefinition unit2 belongs to. |
[in] | flags | Flags that specifiy what should be checked, see ItemCheckFlags. |
a_util::result::SUCCESS | The descriptions are equal. |
ERR_FAILED | The description are not equal. |
Standard | result (other DataDefinition parsing errors etc.) |
|
static |
isEqual checks whether two reference units are equal.
[in] | ref_unit1 | The first unit. |
[in] | source_dd_of_ref_unit1 | The DataDefinition where all references of ref_unit1 are defined |
[in] | ref_unit2 | The second unit. |
[in] | source_dd_of_ref_unit2 | The DataDefinition where all references of ref_unit2 are defined |
[in] | flags | Flags that specifiy what should be checked, see ItemCheckFlags. |
a_util::result::SUCCESS | The descriptions are equal. |
ERR_FAILED | The description are not equal. |
Standard | result (other DataDefinition parsing errors etc.) |
|
static |
isEqual checks whether two prefix descriptions are equal.
[in] | prefix1 | The first prefix. |
[in] | prefix2 | The second prefix. |
[in] | flags | Flags that specifiy what should be checked, see ItemCheckFlags. |
a_util::result::SUCCESS | The descriptions are equal. |
ERR_FAILED | The description are not equal. |
Standard | result (other DataDefinition parsing errors etc.) |
|
static |
isEqual checks whether two descriptions are equal.
[in] | desc1 | The first description. |
[in] | desc2 | The second description. |
[in] | flags | Flags that specifiy what should be checked, see DescriptionCheckFlags. |
a_util::result::SUCCESS | The descriptions are equal. |
ERR_FAILED | The description are not equal. |
Standard | result (other DataDefinition parsing errors etc.) |
|
static |
isEqualPrefix checks whether two prefix descriptions are equal.
[in] | prefix1 | The name of the first prefix. |
[in] | desc1 | The description that has prefix1. |
[in] | prefix2 | The name of the second prefix. |
[in] | desc2 | The description that has prefix2. |
[in] | flags | Flags that specifiy what should be checked, see ItemCheckFlags. |
a_util::result::SUCCESS | The descriptions are equal. |
ERR_FAILED | The description are not equal. |
Standard | result (other DataDefinition parsing errors etc.) |
|
static |
isEqual checks whether two stream descriptions are equal.
[in] | stream1 | The name of the first stream. |
[in] | desc1 | The description that has stream1. |
[in] | stream2 | The name of the second stream. |
[in] | desc2 | The description that has stream2. |
[in] | flags | Flags that specifiy what should be checked, see ItemCheckFlags. |
a_util::result::SUCCESS | The descriptions are equal. |
ERR_FAILED | The description are not equal. |
Standard | result (other DataDefinition parsing errors etc.) |
|
static |
isEqual checks whether two type (POD/enum/struct) descriptions are equal.
When this is true for a struct then it also implies isBinaryEqual is true
[in] | type1 | The name of the first type. |
[in] | desc1 | The description that has type1. |
[in] | type2 | The name of the second type. |
[in] | desc2 | The description that has type2. |
[in] | flags | Flags that specifiy what should be checked, see ItemCheckFlags. |
a_util::result::SUCCESS | The descriptions are equal. |
ERR_FAILED | The description are not equal. |
Standard | result (other DataDefinition parsing errors etc.) |
|
static |
isEqualUnit checks whether two unit descriptions are equal.
[in] | unit1 | The name of the first type. |
[in] | desc1 | The description that has unit1. |
[in] | unit2 | The name of the second type. |
[in] | desc2 | The description that has unit2. |
[in] | flags | Flags that specifiy what should be checked, see ItemCheckFlags. |
a_util::result::SUCCESS | The descriptions are equal. |
ERR_FAILED | The description are not equal. |
Standard | result (other DataDefinition parsing errors etc.) |