3 #pragma GCC diagnostic push
4 #pragma GCC diagnostic ignored "-Wold-style-cast"
5 #include "stg/ObjectSyntax.h"
6 #pragma GCC diagnostic pop
11 void ValueToOS(const T & value, ObjectSyntax * objectSyntax);
15 void ValueToOS<int>(const int & value, ObjectSyntax * objectSyntax)
17 objectSyntax->present = ObjectSyntax_PR_simple;
18 SimpleSyntax_t * simpleSyntax = &objectSyntax->choice.simple;
19 simpleSyntax->present = SimpleSyntax_PR_number;
20 asn_long2INTEGER(&simpleSyntax->choice.number, value);
25 void ValueToOS<unsigned int>(const unsigned int & value, ObjectSyntax * objectSyntax)
27 objectSyntax->present = ObjectSyntax_PR_simple;
28 SimpleSyntax_t * simpleSyntax = &objectSyntax->choice.simple;
29 simpleSyntax->present = SimpleSyntax_PR_number;
30 asn_long2INTEGER(&simpleSyntax->choice.number, value);
35 void ValueToOS<long>(const long & value, ObjectSyntax * objectSyntax)
37 objectSyntax->present = ObjectSyntax_PR_simple;
38 SimpleSyntax_t * simpleSyntax = &objectSyntax->choice.simple;
39 simpleSyntax->present = SimpleSyntax_PR_number;
40 asn_long2INTEGER(&simpleSyntax->choice.number, value);
45 void ValueToOS<unsigned long>(const unsigned long & value, ObjectSyntax * objectSyntax)
47 objectSyntax->present = ObjectSyntax_PR_simple;
48 SimpleSyntax_t * simpleSyntax = &objectSyntax->choice.simple;
49 simpleSyntax->present = SimpleSyntax_PR_number;
50 asn_long2INTEGER(&simpleSyntax->choice.number, value);
55 void ValueToOS<std::string>(const std::string & value, ObjectSyntax * objectSyntax)
57 objectSyntax->present = ObjectSyntax_PR_simple;
58 SimpleSyntax_t * simpleSyntax = &objectSyntax->choice.simple;
59 simpleSyntax->present = SimpleSyntax_PR_string;
60 OCTET_STRING_fromBuf(&simpleSyntax->choice.string, value.c_str(), static_cast<int>(value.length()));