Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
0c96056
FuncArgs & FuncPtr Initial
jamon-bailey Jan 15, 2026
d996d4a
Removed Invalid Source 1/2
jamon-bailey Jan 15, 2026
376381c
Update export.hpp
jamon-bailey Jan 15, 2026
676ea85
Update func_pointer.hpp
jamon-bailey Jan 15, 2026
ef708b0
Update dev_exe.cpp
jamon-bailey Jan 15, 2026
6c20faf
Function Model Update
jamon-bailey Jan 16, 2026
f367128
Update type_traits.hpp
jamon-bailey Jan 16, 2026
5bc03b9
Misc. Adjustments
jamon-bailey Jan 16, 2026
4fbbd3e
Update dev_exe.cpp
jamon-bailey Jan 16, 2026
ce3c828
Add chevron_EXPORTS Definition to C/C++ Build Configs
jamon-bailey Jan 17, 2026
d4f8b20
Refactor namespace usage in function model headers
jamon-bailey Jan 17, 2026
7b39395
Enable chevron_EXPORTS on some debug presets
jamon-bailey Jan 17, 2026
2e2619d
Update Chevron_diagrams.drawio
jamon-bailey Jan 17, 2026
9c3b4c0
Update dev_exe.cpp
jamon-bailey Jan 17, 2026
d60ac7e
General Function Include Header
jamon-bailey Jan 17, 2026
3dcfc89
Preparation For Library Binary Version Info
jamon-bailey Jan 17, 2026
58248d7
Update dev_exe.cpp
jamon-bailey Jan 17, 2026
0c889e1
Moved CMake Install Setup To Explicit Script
jamon-bailey Jan 18, 2026
e106c8a
Update install
jamon-bailey Jan 18, 2026
b40fdab
Chevron Controls GUI FW Build Configuration
jamon-bailey Jan 18, 2026
0e53527
Removed Invalid Source 2/2
jamon-bailey Jan 18, 2026
2111e61
ProgInstance Initial
jamon-bailey Jan 23, 2026
8480dd7
Chevron Diagrams Update
jamon-bailey Jan 23, 2026
88adb76
Update function.hpp
jamon-bailey Jan 23, 2026
19f8698
ProgInstance Export Correction
jamon-bailey Jan 23, 2026
44c904d
Updated Function Concepts
jamon-bailey Jan 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 3rdparty/wxWidgets/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

message(STATUS "Fetching wxWidgets library source...")

if(Chevron_WX_SHARED_BUILD)
if(Chevron_SHARED_BUILD)
# Build wxWidgets as a shared/dynamic library
set(wxBUILD_SHARED ON)
else()
Expand Down
3 changes: 3 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_C_COMPILER": "cl.exe",
"CMAKE_CXX_COMPILER": "cl.exe",
"chevron_EXPORTS": "ON",
"CHEVRON_CLI_DEBUG": "ON",
"CHEVRON_UNIT_TEST": "OFF",
"CHEVRON_BENCHMARK": "OFF",
Expand All @@ -26,6 +27,7 @@
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_C_COMPILER": "gcc.exe",
"CMAKE_CXX_COMPILER": "g++.exe",
"chevron_EXPORTS": "ON",
"CHEVRON_CLI_DEBUG": "ON",
"CHEVRON_UNIT_TEST": "OFF",
"CHEVRON_BENCHMARK": "OFF",
Expand Down Expand Up @@ -65,6 +67,7 @@
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_C_COMPILER": "gcc",
"CMAKE_CXX_COMPILER": "g++",
"chevron_EXPORTS": "ON",
"CHEVRON_CLI_DEBUG": "ON",
"CHEVRON_UNIT_TEST": "OFF",
"CHEVRON_BENCHMARK": "OFF",
Expand Down
4 changes: 4 additions & 0 deletions cmake/compiler/global_c.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,8 @@ target_compile_definitions(
$<$<BOOL:${Chevron_SHARED_BUILD}>:
CHEVRON_SHARED
>

$<$<BOOL:${chevron_EXPORTS}>:
chevron_EXPORTS=1
>
)
4 changes: 4 additions & 0 deletions cmake/compiler/global_cxx.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,8 @@ target_compile_definitions(
$<$<BOOL:${Chevron_SHARED_BUILD}>:
CHEVRON_SHARED
>

$<$<BOOL:${chevron_EXPORTS}>:
chevron_EXPORTS=1
>
)
25 changes: 25 additions & 0 deletions cmake/install_config.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

#======================================
# PROJECT INSTALLATION MODULE
#======================================

# This script should be invoked at the end of
# the /src/CMakeLists.txt file.

# Install main library binary
install(
TARGETS
${CHEVRON_MAIN_BINARY_NAME}

COMPONENT CHEVRON
EXPORT ${CHEVRON_MAIN_BINARY_NAME}-targets

RUNTIME
DESTINATION ${CMAKE_INSTALL_BINDIR}

LIBRARY
DESTINATION ${CMAKE_INSTALL_LIBDIR}

ARCHIVE
DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
6 changes: 0 additions & 6 deletions cmake/utility/options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,3 @@ option(
"Build Chevron with a wxWidgets dependency."
OFF
)

option(
Chevron_WX_SHARED_BUILD
"Build Chevron's wxWidgets dependency as a shared/dynamic library."
ON
)
1,214 changes: 658 additions & 556 deletions docs/prj/Chevron_diagrams.drawio

Large diffs are not rendered by default.

51 changes: 51 additions & 0 deletions include/chevron/common/export.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@

// Copyright (C) 2026 by Jamon T. Bailey and InfinSys, LLC. All rights reserved.
// Released under the terms of the GNU Affero General Public License version 3

// [ISJTB-CXX-XL20260108-000003]

/*!
* @file export.h
*
* @brief
* Library symbol visibility macro definitions.
*/

#if defined(_WIN32) || defined(__CYGWIN__)
/*!
* @brief (Building Dynamic Link Library) Chevron public
* API macro for inline functions/variables, templates,
* and header bound entities.
*/
#define CHEVRON_HEADER_API
#ifdef chevron_EXPORTS
/*!
* @brief (Building Dynamic Link Library) Chevron public
* API macro for classes, functions, and extern variables.
*/
#define CHEVRON_API __declspec(dllexport)
#else
/*!
* @brief Chevron public API macro for classes, functions,
* and extern variables.
*/
#define CHEVRON_API __declspec(dllimport)
#endif
#else
#ifdef chevron_EXPORTS
/*!
* @brief (Building Shared Object) Chevron public API macro
* for inline functions/variables, templates, and header
* bound entities.
*/
#define CHEVRON_HEADER_API __attribute__((visibility("default")))
/*!
* @brief (Building Shared Object) Chevron public API macro
* for classes, functions, and extern variables.
*/
#define CHEVRON_API __attribute__((visibility("default")))
#else
#define CHEVRON_API
#define CHEVRON_HEADER_API
#endif
#endif
51 changes: 0 additions & 51 deletions include/chevron/common/export.hpp

This file was deleted.

57 changes: 57 additions & 0 deletions include/chevron/function.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@

// Copyright (C) 2026 by Jamon T. Bailey and InfinSys, LLC. All rights reserved.
// Released under the terms of the GNU Affero General Public License version 3

// [ISJTB-CXX-XL20260108-000003]

/*!
* @file function.hpp
*
* @brief
* General include header for function related facilities.
*/

#ifndef CHEVRON_LIB_HDR_FUNCTION_INCLUDE_H_
#define CHEVRON_LIB_HDR_FUNCTION_INCLUDE_H_

#include "chevron/model/function/func_args.hpp"
#include "chevron/model/function/func_pointer.hpp"
#include <string>

namespace chevron
{

/*! @brief Callable function that accepts no arguments and returns void. */
using VoidReturnNoArgs = FuncPtr<void>;

/*! @brief Callable function that accepts no arguments and returns a boolean. */
using BoolReturnNoArgs = FuncPtr<bool>;

/*! @brief Callable function that accepts no arguments and returns a character. */
using CharReturnNoArgs = FuncPtr<char>;

/*! @brief Callable function that accepts no arguments and returns an integer. */
using IntReturnNoArgs = FuncPtr<int>;

/*! @brief Callable function that accepts no arguments and returns a float. */
using FloatReturnNoArgs = FuncPtr<float>;

/*! @brief Callable function that accepts no arguments and returns a double. */
using DoubleReturnNoArgs = FuncPtr<double>;

/*! @brief Callable function that accepts no arguments and returns a const char pointer. */
using CstrReturnNoArgs = FuncPtr<const char*>;

/*! @brief Callable function that accepts no arguments and returns a string. */
using StringReturnNoArgs = FuncPtr<std::string>;

/*! @brief Callable function that accepts no arguments and returns size_t. */
using SizeReturnNoArgs = FuncPtr<size_t>;

/*! @brief Callable function that accepts no arguments and returns specified type. */
template <typename ReturnT>
using NoArgsReturn = FuncPtr<ReturnT>;

} // namespace chevron

#endif // CHEVRON_LIB_HDR_FUNCTION_INCLUDE_H_
29 changes: 29 additions & 0 deletions include/chevron/model/function/concepts.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

// Copyright (C) 2026 by Jamon T. Bailey and InfinSys, LLC. All rights reserved.
// Released under the terms of the GNU Affero General Public License version 3

// [ISJTB-CXX-XL20260108-000003]

/*!
* @file concepts.hpp
*
* @brief
* Defines function pointer related entity concepts.
*/

#ifndef CHEVRON_LIB_H_FUNCTION_CONCEPTS_H_
#define CHEVRON_LIB_H_FUNCTION_CONCEPTS_H_

#include <concepts>
#include <type_traits>

namespace chevron::model::concepts
{

/*! @brief Concept that validates indexing into function parameters. */
template <std::size_t Index, typename... ArgsT>
concept is_valid_args_index = Index >= 0 && Index < sizeof...(ArgsT);

} // namespace chevron::model::concepts

#endif // CHEVRON_LIB_H_FUNCTION_CONCEPTS_H_
106 changes: 99 additions & 7 deletions include/chevron/model/function/func_args.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,113 @@
* @brief
*/

#ifndef CHEVRON_CORE_LIB_FUNCTION_ARGUMENTS_H_
#define CHEVRON_CORE_LIB_FUNCTION_ARGUMENTS_H_
#ifndef CHEVRON_LIB_H_FUNCTION_ARGUMENTS_H_
#define CHEVRON_LIB_H_FUNCTION_ARGUMENTS_H_

namespace chevron::model
#include <tuple>
#include <type_traits>
#include <utility>
#include "chevron/model/function/concepts.hpp"

namespace chevron
{

/*!
* @brief
* Function arguments.
* Function arguments container.
*
* @details
* N/A
*/
class CHEVRON_API FuncArgs {};
template <typename... ArgsT>
class FuncArgs {
public:
/*! @brief Argument types pack. */
using Types = std::tuple<ArgsT...>;

/*! @brief Default construct all function arguments. */
constexpr FuncArgs() noexcept((std::is_nothrow_default_constructible_v<ArgsT> && ...))
requires(std::is_default_constructible_v<ArgsT> && ...)
: args{}
{
//
}

/*! @brief Construct function arguments with specified values. */
template <typename... IncomingArgsT>
requires(
sizeof...(IncomingArgsT) == sizeof...(ArgsT) &&
(std::is_constructible_v<ArgsT, IncomingArgsT &&> && ...) &&
(!std::is_same_v<std::remove_cvref_t<IncomingArgsT>, FuncArgs> && ...)
)
constexpr explicit FuncArgs(IncomingArgsT&&... arg
) noexcept((std::is_nothrow_constructible_v<IncomingArgsT> && ...))
: args{std::forward<IncomingArgsT>(arg)...}
{
//
}

~FuncArgs() noexcept = default;

/*! @brief Get argument at specified index. */
template <std::size_t Index>
requires(model::concepts::is_valid_args_index<Index, ArgsT...>)
[[nodiscard]] constexpr decltype(auto) get() noexcept
{
return std::get<Index>(this->args);
}

/*! @brief Get argument at specified index. */
template <std::size_t Index>
requires(model::concepts::is_valid_args_index<Index, ArgsT...>)
[[nodiscard]] constexpr decltype(auto) get() const noexcept
{
return std::get<Index>(this->args);
}

/*! @brief Returns pre-defined arguments tuple. */
[[nodiscard]] constexpr std::tuple<ArgsT...>& argsTuple() noexcept
{
return this->args;
}

/*! @brief Returns pre-defined arguments tuple. */
[[nodiscard]] constexpr const std::tuple<ArgsT...>& argsTuple() const noexcept
{
return this->args;
}

private:
/*! @brief Pre-defined arguments tuple. */
Types args;
};

namespace model::traits
{

/*! @brief Function arguments structure conversion utility. */
template <typename T>
struct to_funcargs;

/*! @brief Tuple to function arguments structure specialization. */
template <typename... ArgsT>
struct to_funcargs<std::tuple<ArgsT...>> {
using type = FuncArgs<ArgsT...>;
};

/*! @brief Function arguments structure conversion utility helper. */
template <typename T>
using to_funcargs_t = to_funcargs<T>::type;

} // namespace model::traits

/*! @details Function argument deduction guide. */
template <typename... ArgsT>
FuncArgs(ArgsT&&...) -> FuncArgs<std::decay_t<ArgsT>...>;

/*! @details Empty function argument deduction guide. */
FuncArgs() -> FuncArgs<>;

}
} // namespace chevron

#endif // CHEVRON_CORE_LIB_FUNCTION_ARGUMENTS_H_
#endif // CHEVRON_LIB_H_FUNCTION_ARGUMENTS_H_
Loading