CHAPTER 8

opendds_idl Options

8.1 opendds_idl命令行選項

使用位於$ DDS_ROOT / bin /中的opendds_idl可執行文件調用OpenDDS IDL編譯器。 它解析單個IDL文件,並生成OpenDDS要求的序列化和密鑰支持代碼,以組織和解散IDL文件中描述的類型,以及數據讀取器和寫入器的類型支持代碼。 對於處理的每個IDL文件(如xyz.idl),它會生成三個文件:xyzTypeSupport.idlxyzTypeSupportImpl.hxyzTypeSupportImpl.cpp。 在典型的用法中,opendds_idl會傳遞一些選項,IDL文件名作為參數傳遞。 例如,

$DDS_ROOT/bin/opendds_idl Foo.idl

下表總結了opendds_idl支持的選項。

表8-1 opendds_idl命令行選項

Option Description Default
-v Enables verbose Quiet execution
-h Prints a help (usage) message and exits N/A
-V Prints version numbers of both TAO and OpenDDS N/A
-Wb,export_macro=macro Export macro used for generating C++ implementation code. No export macro used
-Wb,export_include=file Additional header to #include in generated code -- this header #defines the export macro No additional include
-Wb,pch_include=file Pre-compiled header file to include in generated C++ files No pre-compiled header included
-Dname[=value] Define a preprocessor macro N/A
-Idir Add dir to the preprocessor include path N/A
-o outputdir Output directory where opendds_idl should place the generated files. The current directory
-Wb,java Enable OpenDDS Java Bindings for generated TypeSupport implementation classes No Java support
-Gws Generates Wireshark dissector configuration files of the form <file>_ws.ini. No Wireshark dissector configuration generated
-Gitl Generates Intermediate Type Language descriptions of datatypes used by the Wireshark dissector. Not generated
-GfaceTS Generates FACE (Future Airborne Capability Environment) Transport Services API Not generated
-Lface Generates IDL-to-C++ mapping for FACE Not generated
-Lspcpp Generates IDL-to-C++ mapping for Safety Profile Not generated
-Wb,tao_include_prefix=s Prefix the string s to #include directives meant to include headers generated by tao_idl N/A
-Wb,v8 Generate type support for converting data samples to v8 JavaScript objects Not generated
-ZC include Add an #include directive to the generated .cpp file. Not added
-St Suppress generation of IDL TypeCodes when either of the -L options are present. IDL TypeCodes generated

代碼生成選項允許應用程序開發人員在各種環境中使用生成的代碼。 由於IDL可能包含預處理指令(#include#define等),所以C ++預處理器由opendds_idl調用。 -I和-D選項允許自定義預處理步驟。-Wbexport_macro選項( - 導出被接受為別名)可以將導出宏添加到類定義中。 如果生成的代碼將駐留在共享庫中,並且編譯器(如Visual C ++或GCC)使用導出宏(Visual C ++上的dllexport /覆蓋GCC上的隱藏可見性),則這是必需的。 如果在使用預編譯頭的組件中使用生成的實現代碼,則需要-Wb,pch_include選項。

results matching ""

    No results matching ""