Skip to content

Commit

Permalink
added class md_attribute_parser_with_crc
Browse files Browse the repository at this point in the history
  • Loading branch information
AviaAv committed Nov 19, 2023
1 parent 64ff9a6 commit ee43e4b
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/metadata-parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,28 @@ namespace librealsense
}
};

template<class S, class Attribute, typename Flag>
class md_attribute_parser_with_crc : public md_attribute_parser<S, Attribute, Flag>
{
public:
md_attribute_parser_with_crc(Attribute S::* attribute_name, Flag flag, unsigned long long offset, attrib_modifyer mod)
: md_attribute_parser<S, Attribute, Flag>(attribute_name, flag, offset, mod) {}

protected:
bool is_attribute_valid(const S* s) const override
{
if (!md_attribute_parser<S, Attribute, Flag>::is_attribute_valid(s))
return false;

return true;
}

private:
md_attribute_parser_with_crc() = delete;
md_attribute_parser_with_crc(const md_attribute_parser_with_crc&) = delete;
};



class ds_md_attribute_actual_fps : public md_attribute_parser_base
{
Expand Down

0 comments on commit ee43e4b

Please sign in to comment.