Vanetza
Loading...
Searching...
No Matches
type_traits.hpp
1#pragma once
2
3// forward declaration of ASN.1 types
4using OCTET_STRING_t = struct OCTET_STRING;
5using asn_TYPE_descriptor_t = struct asn_TYPE_descriptor_s;
6
7namespace vanetza
8{
9namespace asn1
10{
11
12template<typename T>
14
15template<> struct asn1_type_traits<OCTET_STRING>
16{
17 static asn_TYPE_descriptor_t& descriptor();
18};
19
20void reset(const asn_TYPE_descriptor_t& td, void* ptr);
21
22template<typename T>
23void reset(T& value)
24{
25 reset(asn1_type_traits<T>::descriptor(), &value);
26}
27
28template<typename T>
29void reset(T* ptr)
30{
31 reset(asn1_type_traits<T>::descriptor(), ptr);
32}
33
34} // namespace asn1
35} // namespace vanetza
bool decode(const ByteBuffer &buffer)
bool decode(const ByteBuffer &buffer)
void swap(asn1c_wrapper_common &other) noexcept
int compare(const asn1c_wrapper_common &other) const
bool validate(std::string &error) const
bool decode(const ByteBuffer &buffer)
Deleter freeing an asn1c struct through its ASN.1 type descriptor.