Skip to content

Commit ccf48ab

Browse files
feat: add doxygen, small start on handle storage, some refactoring, etc
1 parent 18239c1 commit ccf48ab

51 files changed

Lines changed: 3660 additions & 265 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/doxygen.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Deploy Doxygen page
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
permissions:
8+
contents: read
9+
pages: write
10+
id-token: write
11+
12+
jobs:
13+
build-and-deploy:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
submodules: 'recursive'
20+
21+
- name: Install Dependencies
22+
run: |
23+
sudo apt update
24+
sudo apt install -y doxygen graphviz
25+
26+
- name: Set reusable strings
27+
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file.
28+
id: strings
29+
shell: bash
30+
run: |
31+
echo "build-output-dir=${{ github.workspace }}/doc" >> "$GITHUB_OUTPUT"
32+
33+
- name: Configure CMake
34+
# Configure CMake in a 'build' subdirectory. CMAKE_BUILD_TYPE is only required if you are using a single-configuration generator such as make.
35+
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
36+
run: >
37+
cmake -B ${{ steps.strings.outputs.build-output-dir }}
38+
-S ${{ github.workspace }}
39+
-DCMAKE_CXX_COMPILER=g++
40+
-DCMAKE_C_COMPILER=gcc
41+
-DCMAKE_BUILD_TYPE=Debug
42+
43+
- name: Generate docs
44+
# Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
45+
run: >
46+
cmake --build ${{ steps.strings.outputs.build-output-dir }} --config Debug --target JavaOutputStreams.Documentation
47+
48+
- name: Upload artifact
49+
uses: actions/upload-pages-artifact@v3
50+
with:
51+
path: ${{ steps.strings.outputs.build-output-dir }}/docs/html
52+
53+
deploy:
54+
environment:
55+
name: github-pages
56+
url: ${{ steps.deployment.outputs.page_url }}
57+
needs: build-and-deploy
58+
runs-on: ubuntu-latest
59+
name: Deploy
60+
steps:
61+
- name: Deploy to GitHub Pages
62+
id: deployment
63+
uses: actions/deploy-pages@v4

.idea/.name

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CMakeLists.txt

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmake_minimum_required(VERSION VERSION 3.30)
2-
project(JavaObjectStreams VERSION 1.0.2)
2+
project(JavaObjectStreams VERSION 1.1.1)
33

44
set(CMAKE_CXX_STANDARD 20)
55

@@ -38,10 +38,10 @@ set(FILES
3838
include/JavaObject/type/parser/ObjectParser.h
3939
include/JavaObject/type/object/Object.cpp
4040
include/JavaObject/type/object/Object.h
41-
include/JavaObject/type/parser/descriptor/ClassDescriptorParser.cpp
42-
include/JavaObject/type/parser/descriptor/ClassDescriptorParser.h
43-
include/JavaObject/type/object/descriptor/ClassDescriptorObject.cpp
44-
include/JavaObject/type/object/descriptor/ClassDescriptorObject.h
41+
include/JavaObject/type/parser/descriptor/NewClassDescriptorParser.cpp
42+
include/JavaObject/type/parser/descriptor/NewClassDescriptorParser.h
43+
include/JavaObject/type/object/descriptor/NewClassDescriptorObject.cpp
44+
include/JavaObject/type/object/descriptor/NewClassDescriptorObject.h
4545
include/JavaObject/type/parser/descriptor/ClassDescriptorInfoParser.cpp
4646
include/JavaObject/type/parser/descriptor/ClassDescriptorInfoParser.h
4747
include/JavaObject/type/parser/descriptor/FieldDescriptorParser.cpp
@@ -54,6 +54,22 @@ set(FILES
5454
include/JavaObject/type/parser/descriptor/PrimitiveDescriptorParser.h
5555
include/JavaObject/util/SmartPointerCast.cpp
5656
include/JavaObject/util/SmartPointerCast.h
57+
include/JavaObject/type/object/ClassDataObject.cpp
58+
include/JavaObject/type/object/ClassDataObject.h
59+
include/JavaObject/type/object/AnnotationObject.cpp
60+
include/JavaObject/type/object/AnnotationObject.h
61+
include/JavaObject/type/parser/ClassDataParser.cpp
62+
include/JavaObject/type/parser/ClassDataParser.h
63+
include/JavaObject/type/object/descriptor/ClassDescriptorObject.cpp
64+
include/JavaObject/type/object/descriptor/ClassDescriptorObject.h
65+
include/JavaObject/type/parser/descriptor/ClassDescriptorParser.cpp
66+
include/JavaObject/type/parser/descriptor/ClassDescriptorParser.h
67+
include/JavaObject/type/object/ReferenceObject.cpp
68+
include/JavaObject/type/object/ReferenceObject.h
69+
include/JavaObject/type/parser/ReferenceParser.cpp
70+
include/JavaObject/type/parser/ReferenceParser.h
71+
include/JavaObject/type/object/descriptor/ClassDescriptorInfoObject.cpp
72+
include/JavaObject/type/object/descriptor/ClassDescriptorInfoObject.h
5773
)
5874

5975
add_library(JavaObjectStreams SHARED ${FILES})
@@ -69,4 +85,12 @@ if (JAVAOBJECTSTREAMS_BUILD_TESTS)
6985
add_subdirectory(tests)
7086
endif()
7187

72-
unset(JAVAOBJECTSTREAMS_BUILD_TESTS CACHE)
88+
unset(JAVAOBJECTSTREAMS_BUILD_TESTS CACHE)
89+
90+
option(JAVAOBJECTSTREAMS_DOCS_TARGET "Create documentation target" ON)
91+
92+
if (JAVAOBJECTSTREAMS_DOCS_TARGET STREQUAL "ON")
93+
include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/doxygen.cmake")
94+
endif ()
95+
96+
unset(JAVAOBJECTSTREAMS_DOCS_TARGET CACHE)

cmake/doxygen.cmake

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
include(FetchContent)
2+
# https://github.com/jothepro/doxygen-awesome-css?tab=readme-ov-file#cmake-with-fetchcontent
3+
FetchContent_Declare(
4+
doxygen-awesome-css
5+
URL https://github.com/jothepro/doxygen-awesome-css/archive/refs/heads/main.zip
6+
)
7+
FetchContent_MakeAvailable(doxygen-awesome-css)
8+
9+
FetchContent_GetProperties(doxygen-awesome-css SOURCE_DIR AWESOME_CSS_DIR)
10+
11+
FIND_PACKAGE(Doxygen)
12+
IF (DOXYGEN_FOUND)
13+
set(DOXYFILE_IN "${CMAKE_CURRENT_SOURCE_DIR}/docs/Doxyfile.in")
14+
set(DOXYFILE_OUT "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
15+
16+
CONFIGURE_FILE(${DOXYFILE_IN} ${DOXYFILE_OUT} @ONLY)
17+
18+
ADD_CUSTOM_TARGET(JavaOutputStreams.Documentation
19+
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYFILE_OUT}
20+
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
21+
VERBATIM
22+
)
23+
ENDIF ()

0 commit comments

Comments
 (0)