Skip to content

Commit

Permalink
some docs added
Browse files Browse the repository at this point in the history
  • Loading branch information
milyin committed Jul 28, 2023
1 parent a27e369 commit 21e81a1
Show file tree
Hide file tree
Showing 8 changed files with 264 additions and 129 deletions.
9 changes: 7 additions & 2 deletions docs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,21 @@ set(DOXYGEN_INDEX_FILE ${DOXYGEN_OUTPUT_DIR}/html/index.html)
set(DOXYFILE_IN ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in)
set(DOXYFILE_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)

file(GLOB_RECURSE HEADERS ${DOXYGEN_INPUT_DIR}/*.hxx)
# file(GLOB_RECURSE HEADERS ${DOXYGEN_INPUT_DIR}/*.hxx)
set(DOXYGEN_INPUT_FILES
${DOXYGEN_INPUT_DIR}/zenohcxx/base.hxx
${DOXYGEN_INPUT_DIR}/zenohcxx/api.hxx
)

list(JOIN DOXYGEN_INPUT_FILES " " DOXYGEN_INPUT_FILES_CFG)
configure_file(${DOXYFILE_IN} ${DOXYFILE_OUT} @ONLY)

#This will be the main output of our command
set(DOXYGEN_INDEX_FILE ${CMAKE_CURRENT_SOURCE_DIR}/html/index.html)

file(MAKE_DIRECTORY ${DOXYGEN_OUTPUT_DIR})
add_custom_command(OUTPUT ${DOXYGEN_INDEX_FILE}
DEPENDS ${HEADERS}
DEPENDS ${DOXYGEN_INPUT_FILES}
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYFILE_OUT}
MAIN_DEPENDENCY ${DOXYFILE_OUT} ${DOXYFILE_IN}
COMMENT "Generating docs")
Expand Down
6 changes: 3 additions & 3 deletions docs/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,7 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.

INPUT = "@DOXYGEN_INPUT_DIR@"
INPUT = @DOXYGEN_INPUT_FILES_CFG@

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
Expand Down Expand Up @@ -2303,7 +2303,7 @@ PERLMOD_MAKEVAR_PREFIX =
# C-preprocessor directives found in the sources and include files.
# The default value is: YES.

ENABLE_PREPROCESSING = YES
ENABLE_PREPROCESSING = NO

# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names
# in the source code. If set to NO, only conditional compilation will be
Expand Down Expand Up @@ -2353,7 +2353,7 @@ INCLUDE_FILE_PATTERNS =
# recursively expanded use the := operator instead of the = operator.
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.

PREDEFINED =
PREDEFINED = __ZENOHCXX_ZENOHPICO __ZENOHCXX_ZENOHC

# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
# tag can be used to specify a list of macro names that should be expanded. The
Expand Down
15 changes: 5 additions & 10 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,9 @@
API Reference
*************

Generic types
=============
.. toctree::
:maxdepth: 10

.. doxygentypedef:: ErrorMessage

.. doxygentypedef:: ErrNo

.. doxygentypedef:: SampleKind

.. doxygenstruct:: StrArrayView
:members:
enums
copyable
utility
32 changes: 32 additions & 0 deletions docs/copyable.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
..
.. Copyright (c) 2023 ZettaScale Technology
..
.. This program and the accompanying materials are made available under the
.. terms of the Eclipse Public License 2.0 which is available at
.. http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
.. which is available at https://www.apache.org/licenses/LICENSE-2.0.
..
.. SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
..
.. Contributors:
.. ZettaScale Zenoh Team, <zenoh@zettascale.tech>
..
Copyable types
==============

Copyable types are the types which can be freely copied and passed by value.
They either don't reference external resources or they reference resources
without taking ownership.

All these types are based on `Copyable` template.

.. doxygenstruct:: zenohcxx::Copyable
:members:

.. doxygenclass:: BytesView
:members:

.. doxygenstruct:: StrArrayView
.. doxygenstruct:: _StrArrayView
:members:
44 changes: 44 additions & 0 deletions docs/enums.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
..
.. Copyright (c) 2023 ZettaScale Technology
..
.. This program and the accompanying materials are made available under the
.. terms of the Eclipse Public License 2.0 which is available at
.. http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
.. which is available at https://www.apache.org/licenses/LICENSE-2.0.
..
.. SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
..
.. Contributors:
.. ZettaScale Zenoh Team, <zenoh@zettascale.tech>
..
Enums
=====

Enum types are C++ - style typedefs for corrresponding enums of zenoh-c / zenoh-pico C API.

.. doxygentypedef:: ErrorMessage

.. doxygentypedef:: ErrNo

.. doxygentypedef:: SampleKind

.. doxygentypedef:: EncodingPrefix

.. doxygentypedef:: ConsolidationMode

.. doxygentypedef:: Reliability

.. doxygentypedef:: CongestionControl

.. doxygentypedef:: Priority

.. doxygentypedef:: QueryTarget

.. doxygenfunction:: query_target_default

.. doxygentypedef:: WhatAmI
See also ::cpp:func:`as_cstr`

.. doxygenenum:: WhatAmI
See also ::cpp:func:`as_cstr`
20 changes: 20 additions & 0 deletions docs/utility.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
..
.. Copyright (c) 2023 ZettaScale Technology
..
.. This program and the accompanying materials are made available under the
.. terms of the Eclipse Public License 2.0 which is available at
.. http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
.. which is available at https://www.apache.org/licenses/LICENSE-2.0.
..
.. SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
..
.. Contributors:
.. ZettaScale Zenoh Team, <zenoh@zettascale.tech>
..
Utility functions
=================

.. doxygenfunction:: init_logger

.. doxygenfunction:: as_cstr
Loading

0 comments on commit 21e81a1

Please sign in to comment.