-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
📝 (doxygen): Added Doxygen documentation
- Loading branch information
Showing
23 changed files
with
525 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,3 +55,4 @@ build | |
.direnv | ||
result | ||
/debug.c | ||
a.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,16 @@ | ||
cmake_minimum_required(VERSION 3.10) | ||
|
||
project(tinyhash VERSION 0.0.1 LANGUAGES C DESCRIPTION "Simple C hash table implementation.") | ||
project(tinyhash VERSION 0.0.1 LANGUAGES C DESCRIPTION "This is a library containing multiple C implementations of hashmap.") | ||
|
||
option(BUILD_TESTS "Build the tests" OFF) | ||
option(BUILD_DOC "Build the documentation" OFF) | ||
|
||
add_subdirectory(src) | ||
|
||
if (BUILD_TESTS) | ||
add_subdirectory(tests) | ||
endif () | ||
|
||
if (BUILD_DOC) | ||
add_subdirectory(doc) | ||
endif () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
find_package(Doxygen) | ||
|
||
|
||
find_program(DOT_BIN NAMES dot) | ||
|
||
if(DOT_BIN) | ||
set(DOT_BIN_PATH "${DOT_BIN}" CACHE PATH "Path to dot") | ||
else() | ||
set(DOT_BIN_PATH "" CACHE PATH "Path to dot") | ||
endif() | ||
|
||
if(DOXYGEN_FOUND) | ||
message(STATUS "Doxygen found: ${DOXYGEN_EXECUTABLE} -- ${DOXYGEN_VERSION}") | ||
|
||
# set Doxygen input and output files. | ||
set(DOXYGEN_INPUT_DIR ${PROJECT_SOURCE_DIR}/src) | ||
set(DOXYGEN_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/doxygen) | ||
set(DOXYGEN_INDEX_FILE ${DOXYGEN_OUTPUT_DIR}/xml/index.xml) | ||
set(DOXYFILE_IN ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in) | ||
set(DOXYFILE_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile) | ||
|
||
|
||
# Generate DoxyFile from the input file. | ||
configure_file(${DOXYFILE_IN} ${DOXYFILE_OUT} @ONLY) | ||
|
||
# Create Output directory. | ||
file(MAKE_DIRECTORY ${DOXYGEN_OUTPUT_DIR}) | ||
|
||
|
||
# Command for generating doc from Doxygen config file. | ||
add_custom_command(OUTPUT ${DOXYGEN_INDEX_FILE} | ||
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYFILE_OUT} | ||
MAIN_DEPENDENCY ${DOXYFILE_OUT} ${DOXYFILE_IN} | ||
COMMENT "Generating Doxygen documentation" | ||
VERBATIM) | ||
|
||
|
||
# Create CMake Target for generating doc. | ||
add_custom_target(docs ALL DEPENDS ${DOXYGEN_INDEX_FILE}) | ||
|
||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
PROJECT_NAME = "Tinyhash" | ||
PROJECT_BRIEF = "This is a library containing multiple C implementations of hashmap." | ||
EXTRACT_ALL = YES | ||
DISTRIBUTE_GROUP_DOC = YES | ||
EXTRACT_PRIVATE = YES | ||
EXTRACT_PACKAGE = YES | ||
EXTRACT_STATIC = YES | ||
EXTRACT_ANON_NSPACES = YES | ||
WARN_NO_PARAMDOC = YES | ||
RECURSIVE = YES | ||
SOURCE_BROWSER = YES | ||
REFERENCED_BY_RELATION = YES | ||
REFERENCES_RELATION = YES | ||
REFERENCES_LINK_SOURCE = NO | ||
GENERATE_TREEVIEW = NO | ||
|
||
HAVE_DOT = YES | ||
DOT_GRAPH_MAX_NODES = 50 | ||
MAX_DOT_GRAPH_DEPTH = 0 | ||
DOT_PATH = "@DOT_BIN_PATH@" | ||
|
||
CALL_GRAPH = YES | ||
CALLER_GRAPH = YES | ||
CLASS_GRAPH = YES | ||
COLLABORATION_GRAPH = YES | ||
GROUP_GRAPHS = YES | ||
UML_LOOK = YES | ||
TEMPLATE_RELATIONS = YES | ||
INCLUDE_GRAPH = YES | ||
INCLUDED_BY_GRAPH = YES | ||
DIRECTORY_GRAPH = YES | ||
DOT_CLEANUP = YES | ||
|
||
INPUT = "@DOXYGEN_INPUT_DIR@" @PROJECT_SOURCE_DIR@/README.md | ||
USE_MDFILE_AS_MAINPAGE = "@PROJECT_SOURCE_DIR@/README.md" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
#ifndef __TINYHASH_COMMON_TABLE_H__ | ||
#define __TINYHASH_COMMON_TABLE_H__ | ||
|
||
/** | ||
* @brief Generate the next capacity value absed on a previous one. | ||
* | ||
*/ | ||
#define TH_TABLE_NEXT_CAPACITY(capacity) (capacity) == 0 ? 8 : (capacity) * 2 | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
#ifndef __TINYHASH_COMMON_TYPES_H__ | ||
#define __TINYHASH_COMMON_TYPES_H__ | ||
|
||
/** | ||
* @brief Represent any type of data. | ||
* | ||
*/ | ||
typedef void *th_any_t; | ||
|
||
/** | ||
* @brief Represents any table. | ||
* | ||
*/ | ||
typedef void *th_generic_table_t; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.