Disable hpp documentation for .NET.
GitOrigin-RevId: 4969d3196aeae0c7398bc06d5285df443a79f379
This commit is contained in:
parent
a80b8e951a
commit
070f6ff184
@ -103,6 +103,9 @@ if (NOT CMAKE_CROSSCOMPILING)
|
|||||||
if (TD_ENABLE_JNI)
|
if (TD_ENABLE_JNI)
|
||||||
target_compile_definitions(generate_common PRIVATE TD_ENABLE_JNI=1)
|
target_compile_definitions(generate_common PRIVATE TD_ENABLE_JNI=1)
|
||||||
endif()
|
endif()
|
||||||
|
if (TD_ENABLE_DOTNET)
|
||||||
|
target_compile_definitions(generate_common PRIVATE DISABLE_HPP_DOCUMENTATION=1)
|
||||||
|
endif()
|
||||||
|
|
||||||
add_executable(generate_c ${TL_GENERATE_C_SOURCE})
|
add_executable(generate_c ${TL_GENERATE_C_SOURCE})
|
||||||
target_link_libraries(generate_c PRIVATE tdtl)
|
target_link_libraries(generate_c PRIVATE tdtl)
|
||||||
|
@ -11,7 +11,11 @@
|
|||||||
namespace td {
|
namespace td {
|
||||||
|
|
||||||
bool TD_TL_writer_hpp::is_documentation_generated() const {
|
bool TD_TL_writer_hpp::is_documentation_generated() const {
|
||||||
|
#ifdef DISABLE_HPP_DOCUMENTATION
|
||||||
|
return false;
|
||||||
|
#else
|
||||||
return true;
|
return true;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int TD_TL_writer_hpp::get_additional_function_type(const std::string &additional_function_name) const {
|
int TD_TL_writer_hpp::get_additional_function_type(const std::string &additional_function_name) const {
|
||||||
@ -37,11 +41,13 @@ std::string TD_TL_writer_hpp::gen_base_tl_class_name() const {
|
|||||||
std::string TD_TL_writer_hpp::gen_output_begin() const {
|
std::string TD_TL_writer_hpp::gen_output_begin() const {
|
||||||
return "#pragma once\n"
|
return "#pragma once\n"
|
||||||
"\n"
|
"\n"
|
||||||
|
#ifndef DISABLE_HPP_DOCUMENTATION
|
||||||
"/**\n"
|
"/**\n"
|
||||||
" * \\file\n"
|
" * \\file\n"
|
||||||
" * Contains downcast_call methods for calling a function object on downcasted to\n"
|
" * Contains downcast_call methods for calling a function object on downcasted to\n"
|
||||||
" * the most derived class TDLib API object.\n"
|
" * the most derived class TDLib API object.\n"
|
||||||
" */\n"
|
" */\n"
|
||||||
|
#endif
|
||||||
"#include \"" +
|
"#include \"" +
|
||||||
tl_name +
|
tl_name +
|
||||||
".h\"\n"
|
".h\"\n"
|
||||||
@ -195,12 +201,15 @@ std::string TD_TL_writer_hpp::gen_additional_proxy_function_begin(const std::str
|
|||||||
const std::string &class_name, int arity,
|
const std::string &class_name, int arity,
|
||||||
bool is_function) const {
|
bool is_function) const {
|
||||||
assert(function_name == "downcast_call");
|
assert(function_name == "downcast_call");
|
||||||
return "/**\n"
|
return
|
||||||
|
#ifndef DISABLE_HPP_DOCUMENTATION
|
||||||
|
"/**\n"
|
||||||
" * Calls the specified function object with the given object downcasted to its most derived type.\n"
|
" * Calls the specified function object with the given object downcasted to its most derived type.\n"
|
||||||
" * \\param[in] obj Object to pass as an argument to the function object.\n"
|
" * \\param[in] obj Object to pass as an argument to the function object.\n"
|
||||||
" * \\param[in] func Function object to which the object will be passed.\n"
|
" * \\param[in] func Function object to which the object will be passed.\n"
|
||||||
" * \\returns Whether function object call has happened. Should always return true for correct parameters.\n"
|
" * \\returns Whether function object call has happened. Should always return true for correct parameters.\n"
|
||||||
" */\n"
|
" */\n"
|
||||||
|
#endif
|
||||||
"template <class T>\n"
|
"template <class T>\n"
|
||||||
"bool downcast_call(" +
|
"bool downcast_call(" +
|
||||||
class_name +
|
class_name +
|
||||||
|
Loading…
Reference in New Issue
Block a user