19 #include <ast_generator.h> 27 static const char WB_EXPORT_MACRO[] =
"export_macro=";
28 static const size_t SZ_WB_EXPORT_MACRO =
sizeof(WB_EXPORT_MACRO) - 1;
29 static const char WB_EXPORT_INCLUDE[] =
"export_include=";
30 static const size_t SZ_WB_EXPORT_INCLUDE =
sizeof(WB_EXPORT_INCLUDE) - 1;
31 static const char WB_VERSIONING_NAME[] =
"versioning_name=";
32 static const size_t SZ_WB_VERSIONING_NAME =
sizeof(WB_VERSIONING_NAME) - 1;
33 static const char WB_VERSIONING_BEGIN[] =
"versioning_begin=";
34 static const size_t SZ_WB_VERSIONING_BEGIN =
sizeof(WB_VERSIONING_BEGIN) - 1;
35 static const char WB_VERSIONING_END[] =
"versioning_end=";
36 static const size_t SZ_WB_VERSIONING_END =
sizeof(WB_VERSIONING_END) - 1;
37 static const char WB_PCH_INCLUDE[] =
"pch_include=";
38 static const size_t SZ_WB_PCH_INCLUDE =
sizeof(WB_PCH_INCLUDE) - 1;
39 static const char WB_CPP_INCLUDE[] =
"cpp_include=";
40 static const size_t SZ_WB_CPP_INCLUDE =
sizeof(WB_CPP_INCLUDE) - 1;
41 static const char WB_JAVA[] =
"java";
42 static const size_t SZ_WB_JAVA =
sizeof(WB_JAVA) - 1;
43 static const char WB_TAO_INC_PRE[] =
"tao_include_prefix=";
44 static const size_t SZ_WB_TAO_INC_PRE =
sizeof(WB_TAO_INC_PRE) - 1;
45 static const char WB_TS_CPP_INCLUDE[] =
"ts_cpp_include=";
46 static const size_t SZ_WB_TS_CPP_INCLUDE =
sizeof(WB_TS_CPP_INCLUDE) - 1;
47 static const char WB_DDS_SEQ_SUFFIX[] =
"opendds_sequence_suffix=";
48 static const size_t SZ_WB_DDS_SEQ_SUFFIX =
sizeof(WB_DDS_SEQ_SUFFIX) - 1;
51 be_global->export_macro(arg + SZ_WB_EXPORT_MACRO);
54 SZ_WB_EXPORT_INCLUDE)) {
55 be_global->export_include(arg + SZ_WB_EXPORT_INCLUDE);
58 SZ_WB_VERSIONING_NAME)) {
59 be_global->versioning_name(arg + SZ_WB_VERSIONING_NAME);
62 SZ_WB_VERSIONING_BEGIN)) {
63 be_global->versioning_begin(arg + SZ_WB_VERSIONING_BEGIN);
66 SZ_WB_VERSIONING_END)) {
67 be_global->versioning_end(arg + SZ_WB_VERSIONING_END);
70 be_global->pch_include(arg + SZ_WB_PCH_INCLUDE);
73 be_global->add_cpp_include(arg + SZ_WB_CPP_INCLUDE);
78 be_global->java_arg(arg + SZ_WB_JAVA + 1 );
82 be_global->tao_inc_pre_ = arg + SZ_WB_TAO_INC_PRE;
85 be_global->add_include(arg + SZ_WB_TS_CPP_INCLUDE, BE_GlobalData::STREAM_CPP);
88 be_global->sequence_suffix(arg + SZ_WB_DDS_SEQ_SUFFIX);
102 " -o <dir> set output directory for all files\n" 103 " -Lface generate FACE IDL to C++ mapping\n" 104 " -Lspcpp generate Safety Profile IDL to C++ mapping\n" 105 " -Lc++11 generate IDL to C++11 mapping\n" 106 " -SI suppress generation of *TypeSupport.idl\n" 107 " -Sa suppress IDL any (ignored, for tao_idl compatibility)\n" 108 " -St suppress IDL typecode when -L* option is present\n" 109 " -Sv suppress ValueReader and ValueWriter generation\n" 110 " -Sx suppress XTypes TypeObject and TypeIdentifier generation\n" 111 " -Sdefault exclude default TypeSupport generators from output\n" 112 " -Gitl generate ITL\n" 113 " -GfaceTS generate FACE TS API for DCPS data types\n" 114 " -Grapidjson generate TypeSupport for converting data samples to\n" 115 " RapidJSON JavaScript objects\n" 116 " -Gxtypes-complete generate XTypes complete TypeObject and TypeIdentifier\n" 117 " --filename-only-includes strip leading directories from generated\n" 119 " --[no-]default-nested topic types must be declared\n" 120 " (true by default)\n" 121 " --no-dcps-data-type-warnings don't warn about #pragma DCPS_DATA_TYPE\n" 122 " --default-extensibility final|appendable|mutable\n" 123 " set the default XTypes extensibility\n" 124 " kind (appendable if not set)\n" 125 " --default-autoid sequential|hash set the default XTypes autoid approach\n" 126 " (sequential if not set)\n" 127 " --default-try-construct discard|use-default|trim\n" 128 " set the default XTypes try-construct\n" 129 " behavior (discard if not set)\n" 130 " --old-typeobject-encoding use the pre-3.18 encoding of TypeObjects\n" 131 " when deriving TypeIdentifiers\n" 132 " --old-typeobject-member-order use the pre-3.24 struct and union\n" 133 " member order for TypeObjects, which is\n" 134 " ordered by member id instead of\n" 136 " -Wb,export_macro=<macro name> set export macro for all files\n" 137 " --export=<macro name> Alias for -Wb,export_macro\n" 138 " -Wb,export_include=<include path> set export include file for all files\n" 139 " -Wb,versioning_name=<macro name> set versioning name macro for all files\n" 140 " -Wb,versioning_begin=<macro name> set versioning begin macro for all files\n" 141 " -Wb,versioning_end=<macro name> set versioning end macro for all files\n" 142 " -Wb,pch_include=<include path> set include file for precompiled header\n" 144 " -Wb,cpp_include=<include path> set additional include file for cpp\n" 145 " files. Useful for 'after the fact'\n" 146 " typesupport generation with different\n" 147 " features enabled than in the first pass.\n" 148 " -Wb,java[=<output_file>] enable Java support for TypeSupport\n" 149 " files. Do not specify an 'output_file'\n" 150 " except for special cases.\n" 151 " -Wb,tao_include_prefix=<path> prefix for including the TAO-generated\n" 153 " -Wb,ts_cpp_include=<include> add <include> to *TypeSupportImpl.cpp\n" 154 " -Wb,opendds_sequence_suffix=<suffix> set the implied DDS sequence suffix\n" 155 " (default is 'Seq')\n" 162 AST_Generator* gen = 0;
171 if (!value || !value[0]) {
172 ACE_ERROR((LM_ERROR,
"Error - The environment variable DDS_ROOT must be set.\n"));
181 idl_global->err()->misc_error(message.c_str(), node);
const LogLevel::Value value
static TAO_IFR_BE_Export AST_Generator * generator_init(void)
int strncasecmp(const char *s, const char *t, size_t len)
char * getenv(const char *symbol)
size_t strlen(const char *s)
static TAO_IFR_BE_Export void arg_post_proc(void)
static TAO_IFR_BE_Export void prep_be_arg(char *s)
const char * dds_root()
Get DDS_ROOT. It is a fatal error if it wasn't set.
BE_GlobalData * be_global
static TAO_IFR_BE_Export void usage(void)
#define ACE_NEW_RETURN(POINTER, CONSTRUCTOR, RET_VAL)
void misc_error_and_abort(const std::string &message, AST_Decl *node=0)
Report a miscellaneous error and abort.