From 0c96056368d867fe998334e21f3c0a74115fe15f Mon Sep 17 00:00:00 2001 From: Jamon Bailey Date: Thu, 15 Jan 2026 18:32:09 -0500 Subject: [PATCH 01/26] FuncArgs & FuncPtr Initial Incomplete; Introduces FuncArgs and FuncPtr template classes to header API along with associated concepts --- include/chevron/model/function/concepts.hpp | 36 +++++ include/chevron/model/function/func_args.hpp | 87 ++++++++++- .../chevron/model/function/func_pointer.hpp | 142 +++++++++++++++++- 3 files changed, 251 insertions(+), 14 deletions(-) create mode 100644 include/chevron/model/function/concepts.hpp diff --git a/include/chevron/model/function/concepts.hpp b/include/chevron/model/function/concepts.hpp new file mode 100644 index 0000000..74ac7be --- /dev/null +++ b/include/chevron/model/function/concepts.hpp @@ -0,0 +1,36 @@ + +// 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 +#include + +namespace chevron::model::concepts +{ + +/*! @brief Concepts that validates construction of function arguments. */ +template +concept is_viable_function_arguments = + (sizeof...(IncomingArgsT) == sizeof...(ArgsT)) && + (std::is_constructible_v && ...) && + (!std::is_same_v, FuncArgsT> && ...); + +/*! @brief Concept that validates indexing into function parameters. */ +template +concept is_valid_args_index = Index >= 0 && Index < sizeof...(ArgsT); + +} // namespace chevron::model::concepts + +#endif // CHEVRON_LIB_H_FUNCTION_CONCEPTS_H_ diff --git a/include/chevron/model/function/func_args.hpp b/include/chevron/model/function/func_args.hpp index 9cd5568..efbd467 100644 --- a/include/chevron/model/function/func_args.hpp +++ b/include/chevron/model/function/func_args.hpp @@ -10,21 +10,96 @@ * @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_ + +#include +#include +#include +#include "chevron/common/export.hpp" +#include "chevron/model/function/concepts.hpp" namespace chevron::model { /*! * @brief - * Function arguments. + * Function arguments container. * * @details * N/A */ -class CHEVRON_API FuncArgs {}; +template +class FuncArgs { + public: + /*! @brief Argument types pack. */ + using Types = std::tuple; + + /*! @brief Default construct all function arguments. */ + constexpr FuncArgs() noexcept((std::is_nothrow_default_constructible_v && ...)) + requires(std::is_default_constructible_v && ...) + : args{} + { + // + } + + /*! @brief Construct function arguments with specified values. */ + template + requires( + sizeof...(IncomingArgsT) == sizeof...(ArgsT) && + (std::is_constructible_v && ...) && + (!std::is_same_v, FuncArgs> && ...) + ) + constexpr explicit FuncArgs(IncomingArgsT&&... arg) noexcept( + (std::is_nothrow_constructible_v && ...) + ) + : args{std::forward(arg)...} + { + // + } + + ~FuncArgs() noexcept = default; + + /*! @brief Get argument at specified index. */ + template + requires(concepts::is_valid_args_index) + [[nodiscard]] constexpr decltype(auto) get() noexcept + { + return std::get(this->args); + } + + /*! @brief Get argument at specified index. */ + template + requires(concepts::is_valid_args_index) + [[nodiscard]] constexpr decltype(auto) get() const noexcept + { + return std::get(this->args); + } + + /*! @brief Returns pre-defined arguments tuple. */ + [[nodiscard]] constexpr std::tuple& argsTuple() noexcept + { + return this->args; + } + + /*! @brief Returns pre-defined arguments tuple. */ + [[nodiscard]] constexpr const std::tuple& argsTuple() const noexcept + { + return this->args; + } + + private: + /*! @brief Pre-defined arguments tuple. */ + Types args; +}; + +/*! @details Function argument deduction guide. */ +template +FuncArgs(ArgsT&&...) -> FuncArgs...>; + +/*! @details Empty function argument deduction guide. */ +FuncArgs() -> FuncArgs<>; -} +} // namespace chevron::model -#endif // CHEVRON_CORE_LIB_FUNCTION_ARGUMENTS_H_ +#endif // CHEVRON_LIB_H_FUNCTION_ARGUMENTS_H_ diff --git a/include/chevron/model/function/func_pointer.hpp b/include/chevron/model/function/func_pointer.hpp index 44d3eef..bfab3b6 100644 --- a/include/chevron/model/function/func_pointer.hpp +++ b/include/chevron/model/function/func_pointer.hpp @@ -11,24 +11,150 @@ * Provides declaration of callable function pointer. */ -#ifndef CHEVRON_CORE_LIB_FUNCTION_POINTER_H_ -#define CHEVRON_CORE_LIB_FUNCTION_POINTER_H_ +#ifndef CHEVRON_LIB_H_FUNCTION_POINTER_H_ +#define CHEVRON_LIB_H_FUNCTION_POINTER_H_ -#include -#include"chevron/common/export.hpp" +#include +#include "chevron/common/export.hpp" +#include "chevron/model/function/func_args.hpp" namespace chevron::model { +/*! @details Base specialization template. */ +template > +class FuncPtr; + /*! * @brief * Function pointer. - * + * * @details * N/A */ -class CHEVRON_API FuncPtr {}; +template +class FuncPtr> { + public: + /*! @brief Function return type. */ + using ReturnType = ReturnT; + /*! @brief Function arguments container. */ + using Arguments = FuncArgs; + /*! @brief Specialized standard library function pointer type. */ + using StdFunc = std::function; + + FuncPtr() noexcept = default; + + /*! @brief Construct from a free function, lambda, or functor. */ + template + requires std::is_invocable_r_v + explicit FuncPtr(Function&& callable) : funcPtr{std::forward(callable)} + { + // + } + + /*! @brief Construct from a member method of a class instance. */ + template + FuncPtr(ClassType* instance, Method method) + { + if (instance && method) { + this->funcPtr = [instance, method](ArgsT... args) -> ReturnType + { + return (instance->*method)(std::forward(args)...); + }; + } + } + + ~FuncPtr() noexcept = default; + + /*! @brief Execute function with specified arguments. */ + ReturnType operator()(ArgsT... arg) const + { + return this->funcPtr(std::forward(arg)...); + } + + /*! @brief Execute function with specified arguments. */ + ReturnType operator()(Arguments& arguments) + { + return std::apply(this->funcPtr, arguments.argsTuple()); + } + + /*! @brief Verify presence of callable function. */ + [[nodiscard]] explicit operator bool() const noexcept + { + return !!this->funcPtr; + } + + /*! + * @brief + * Evaluates presence of internal callable function. + * + * @return + * True if no function present + */ + [[nodiscard]] bool isInvalid() const noexcept + { + return !this->operator bool(); + } + + /*! + * @brief + * Bind callable free function, lambda, or functor. + * + * @return + * True if successful + */ + [[nodiscard]] bool bind(ReturnType(*callable)(ArgsT...)) + { + if (callable) { + this->funcPtr = [callable](ArgsT... args) -> ReturnType { + return callable(std::forward(args)...); + }; + return true; + } + return false; + } + + /*! + * @brief + * Bind callable member method of a class. + * + * @return + * True if successful + */ + template + [[nodiscard]] bool bind(ClassType* instance, Method method) + { + if (instance && method) { + this->funcPtr = [instance, method](ArgsT... args) -> ReturnType { + return (instance->*method)(std::forward(args)...); + }; + } + return false; + } + + private: + /*! @brief Function pointer. */ + StdFunc funcPtr; +}; + +/*! @details Default constructor deduction guide. */ +//FuncPtr() -> FuncPtr>; + +/*! @details Free function deduction guide. */ +template +FuncPtr(ReturnT (*)(ArgsT...)) -> FuncPtr>; + +/*! @details Non-const member function deduction guide. */ +template +FuncPtr(ClassType*, ReturnT (ClassType::*)(ArgsT...)) -> FuncPtr>; + +/*! @details Const member function deduction guide. */ +template +FuncPtr(ClassType*, ReturnT (ClassType::*)(ArgsT...) const) + -> FuncPtr>; + +// TODO: Lambda and functor deduction guide!!! -} +} // namespace chevron::model -#endif // CHEVRON_CORE_LIB_FUNCTION_POINTER_H_ +#endif // CHEVRON_LIB_H_FUNCTION_POINTER_H_ From d996d4ac28576683c592788fbf1c121821aa1f0d Mon Sep 17 00:00:00 2001 From: Jamon Bailey Date: Thu, 15 Jan 2026 18:34:40 -0500 Subject: [PATCH 02/26] Removed Invalid Source 1/2 Both 'func_args.cpp' and 'func_pointer.cpp' will be removed since both entities are templates. The 'func_pointer.cpp' file will be temporarily used as a temp source to feed the shared/dynamic library on build --- src/model/CMakeLists.txt | 1 - src/model/function/func_args.cpp | 32 ----------------------------- src/model/function/func_pointer.cpp | 2 +- 3 files changed, 1 insertion(+), 34 deletions(-) delete mode 100644 src/model/function/func_args.cpp diff --git a/src/model/CMakeLists.txt b/src/model/CMakeLists.txt index 422845d..ea2b744 100644 --- a/src/model/CMakeLists.txt +++ b/src/model/CMakeLists.txt @@ -7,6 +7,5 @@ target_sources( ${CHEVRON_MAIN_BINARY_NAME} PUBLIC - "${CMAKE_CURRENT_SOURCE_DIR}/function/func_args.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/function/func_pointer.cpp" ) diff --git a/src/model/function/func_args.cpp b/src/model/function/func_args.cpp deleted file mode 100644 index 92cea1c..0000000 --- a/src/model/function/func_args.cpp +++ /dev/null @@ -1,32 +0,0 @@ - -// 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] - -//#include" - -// CLASS : CONSTRUCTOR -// CLASS : CONSTRUCTOR END! - -// CLASS : DESTRUCTOR - - -// CLASS : STATIC -// CLASS : STATIC END! - - -// CLASS : OPERATOR -// CLASS : OPERATOR END! - - -// CLASS : PUBLIC -// CLASS : PUBLIC END! - - -// CLASS : PROTECTED -// CLASS : PROTECTED END! - - -// CLASS : PRIVATE -// CLASS : PRIVATE END! diff --git a/src/model/function/func_pointer.cpp b/src/model/function/func_pointer.cpp index 20ec02d..30cc7cf 100644 --- a/src/model/function/func_pointer.cpp +++ b/src/model/function/func_pointer.cpp @@ -4,7 +4,7 @@ // [ISJTB-CXX-XL20260108-000003] -#include"chevron/model/function/func_pointer.hpp" +#include "chevron/model/function/func_pointer.hpp" // chevron::model::FuncPtr : CONSTRUCTOR // chevron::model::FuncPtr : CONSTRUCTOR END! From 376381c6a7deae9b3b6e88a35a44a408e7b14269 Mon Sep 17 00:00:00 2001 From: Jamon Bailey Date: Thu, 15 Jan 2026 18:34:55 -0500 Subject: [PATCH 03/26] Update export.hpp Clang-Format run --- include/chevron/common/export.hpp | 64 +++++++++++++++---------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/include/chevron/common/export.hpp b/include/chevron/common/export.hpp index ea6cb56..a2aed92 100644 --- a/include/chevron/common/export.hpp +++ b/include/chevron/common/export.hpp @@ -12,40 +12,40 @@ */ #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. + * API macro for inline functions/variables, templates, + * and header bound entities. */ - #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 + #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 From 676ea850ef42e3c4611b01e405414f16d16d3b9f Mon Sep 17 00:00:00 2001 From: Jamon Bailey Date: Thu, 15 Jan 2026 18:44:46 -0500 Subject: [PATCH 04/26] Update func_pointer.hpp Corrected storage approach of free callables --- include/chevron/model/function/func_pointer.hpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/chevron/model/function/func_pointer.hpp b/include/chevron/model/function/func_pointer.hpp index bfab3b6..bf28f55 100644 --- a/include/chevron/model/function/func_pointer.hpp +++ b/include/chevron/model/function/func_pointer.hpp @@ -106,9 +106,7 @@ class FuncPtr> { [[nodiscard]] bool bind(ReturnType(*callable)(ArgsT...)) { if (callable) { - this->funcPtr = [callable](ArgsT... args) -> ReturnType { - return callable(std::forward(args)...); - }; + this->funcPtr = std::forward(callable); return true; } return false; From ef708b01fb44ba5c49f1a8bc080bf7ac02f041f4 Mon Sep 17 00:00:00 2001 From: Jamon Bailey Date: Thu, 15 Jan 2026 18:46:00 -0500 Subject: [PATCH 05/26] Update dev_exe.cpp --- tests/cli/dev_exe.cpp | 63 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) diff --git a/tests/cli/dev_exe.cpp b/tests/cli/dev_exe.cpp index 3ef4a68..df9ba2a 100644 --- a/tests/cli/dev_exe.cpp +++ b/tests/cli/dev_exe.cpp @@ -1,11 +1,72 @@ #include +#include"chevron/model/function/func_args.hpp" +#include"chevron/model/function/func_pointer.hpp" + +template +using FuncArgs = chevron::model::FuncArgs; + +template +using FuncPtr = chevron::model::FuncPtr; + +bool demoMethod(int val1, int val2) +{ + return val1 == val2; +} + +char demoMethod2(bool good) +{ + return 'G'; +} + +int demoMethod3() +{ + return 100; +} + +struct tester { + tester(const int initVal) : value{ initVal } {} + + int getVal() const { return value; } + void setValue(const int newVal) { value = newVal; } + bool isMatch(const int val1, const int val2) const { return val1 == val2; } + + int value; +}; int main(int argc, char* argv[]) { //\\// // - std::cout << "\nFunctioning properly." << std::endl; + FuncArgs cmdlArgs{ argc, argv }; + + tester ggg{ 12 }; + + FuncArgs args{ 10, 10 }; + FuncPtr demoCall{ demoMethod }; + FuncPtr callPtr{ &ggg, &tester::isMatch }; + FuncPtr freeCall{ demoMethod2 }; + FuncPtr noArgCall; + + if (freeCall) + std::cout << freeCall(false) << std::endl; + + if (callPtr) + std::cout << callPtr(args) << std::endl; + + if (!noArgCall.bind(demoMethod3)) + return -1; + + if (!callPtr.bind(&ggg, &tester::isMatch)) + return -1; + + noArgCall(); + callPtr(25, 16); + + // struct FunctionModel --> ReturnType & Arguments --> FuncPtr or Func + + // Static callable type? (No heap alloc) + return 0; } From 6c20fafa33f396693d394ccf6e7d91c911b54f50 Mon Sep 17 00:00:00 2001 From: Jamon Bailey Date: Fri, 16 Jan 2026 14:56:22 -0500 Subject: [PATCH 06/26] Function Model Update --- include/chevron/model/function/func_args.hpp | 20 +++++- .../chevron/model/function/func_pointer.hpp | 38 +++++++--- .../chevron/model/function/type_traits.hpp | 70 +++++++++++++++++++ 3 files changed, 116 insertions(+), 12 deletions(-) create mode 100644 include/chevron/model/function/type_traits.hpp diff --git a/include/chevron/model/function/func_args.hpp b/include/chevron/model/function/func_args.hpp index efbd467..a685f9b 100644 --- a/include/chevron/model/function/func_args.hpp +++ b/include/chevron/model/function/func_args.hpp @@ -16,7 +16,6 @@ #include #include #include -#include "chevron/common/export.hpp" #include "chevron/model/function/concepts.hpp" namespace chevron::model @@ -93,6 +92,25 @@ class FuncArgs { Types args; }; +namespace traits +{ + +/*! @brief Function arguments structure conversion utility. */ +template +struct to_funcargs; + +/*! @brief Tuple to function arguments structure specialization. */ +template +struct to_funcargs> { + using type = FuncArgs; +}; + +/*! @brief Function arguments structure conversion utility helper. */ +template +using to_funcargs_t = to_funcargs::type; + +} // namespace traits + /*! @details Function argument deduction guide. */ template FuncArgs(ArgsT&&...) -> FuncArgs...>; diff --git a/include/chevron/model/function/func_pointer.hpp b/include/chevron/model/function/func_pointer.hpp index bf28f55..e154d85 100644 --- a/include/chevron/model/function/func_pointer.hpp +++ b/include/chevron/model/function/func_pointer.hpp @@ -15,13 +15,13 @@ #define CHEVRON_LIB_H_FUNCTION_POINTER_H_ #include -#include "chevron/common/export.hpp" #include "chevron/model/function/func_args.hpp" +#include "chevron/model/function/type_traits.hpp" namespace chevron::model { -/*! @details Base specialization template. */ +/*! @brief Base specialization template. */ template > class FuncPtr; @@ -87,7 +87,7 @@ class FuncPtr> { /*! * @brief * Evaluates presence of internal callable function. - * + * * @return * True if no function present */ @@ -99,14 +99,14 @@ class FuncPtr> { /*! * @brief * Bind callable free function, lambda, or functor. - * + * * @return * True if successful */ - [[nodiscard]] bool bind(ReturnType(*callable)(ArgsT...)) + [[nodiscard]] bool bind(ReturnType (*callable)(ArgsT...)) { if (callable) { - this->funcPtr = std::forward(callable); + this->funcPtr = std::forward(callable); return true; } return false; @@ -123,9 +123,11 @@ class FuncPtr> { [[nodiscard]] bool bind(ClassType* instance, Method method) { if (instance && method) { - this->funcPtr = [instance, method](ArgsT... args) -> ReturnType { + this->funcPtr = [instance, method](ArgsT... args) -> ReturnType + { return (instance->*method)(std::forward(args)...); }; + return true; } return false; } @@ -135,9 +137,6 @@ class FuncPtr> { StdFunc funcPtr; }; -/*! @details Default constructor deduction guide. */ -//FuncPtr() -> FuncPtr>; - /*! @details Free function deduction guide. */ template FuncPtr(ReturnT (*)(ArgsT...)) -> FuncPtr>; @@ -151,7 +150,24 @@ template FuncPtr(ClassType*, ReturnT (ClassType::*)(ArgsT...) const) -> FuncPtr>; -// TODO: Lambda and functor deduction guide!!! +/*! @details Lambda and functor deduction guide. */ +template +FuncPtr(Function&&) -> FuncPtr< + typename traits::callable_signature>::ReturnType, + traits::to_funcargs_t< + typename traits::callable_signature>::ArgsTuple>>; + +// TODO: Lambda and functor deduction guide only works +// when directly naming `FuncPtr` with it's fully +// qualified name. Other instantiations do not +// appear to exhibit this behavior in identical +// circumstances. + +// NOTE: Is this because there is no `FuncPtr` constructor +// that can construct a call to the `::operator()` +// method of the lambda/functor? Perhaps the reliance +// soley on the guide to properly make the appropriate +// type is the issue here. } // namespace chevron::model diff --git a/include/chevron/model/function/type_traits.hpp b/include/chevron/model/function/type_traits.hpp new file mode 100644 index 0000000..f07e626 --- /dev/null +++ b/include/chevron/model/function/type_traits.hpp @@ -0,0 +1,70 @@ + +// 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 type_traits.hpp + * + * @brief + * Defines function related entity type traits. + */ + +#ifndef CHEVRON_LIB_H_FUNCTION_TYPE_TRAITS_H_ +#define CHEVRON_LIB_H_FUNCTION_TYPE_TRAITS_H_ + +#include +#include +#include + +namespace chevron::model::traits +{ + +/*! @brief Callable entity signature extraction utility. */ +template +struct callable_signature; + +/*! + * @brief + * Lambda and functor signature extraction utility. + */ +template +struct callable_signature : callable_signature { }; + +/*! + * @brief + * Non-const member method signature extraction specialization. + */ +template +struct callable_signature { + using ReturnType = ReturnT; + using ArgsTuple = std::tuple; + using FuncType = ReturnT (ClassType::*)(ArgsT...); +}; + +/*! + * @brief + * Const member method signature extraction specialization. + */ +template +struct callable_signature { + using ReturnType = ReturnT; + using ArgsTuple = std::tuple; + using FuncType = ReturnT (ClassType::*)(ArgsT...); +}; + +/*! + * @brief + * Free method signature extraction specialization. + */ +template +struct callable_signature { + using ReturnType = ReturnT; + using ArgsTuple = std::tuple; + using FuncType = ReturnT (*)(ArgsT...); +}; + +} // namespace chevron::model::traits + +#endif // CHEVRON_LIB_H_FUNCTION_TYPE_TRAITS_H_ From f367128f2249247018dca4d86f9728e01854240d Mon Sep 17 00:00:00 2001 From: Jamon Bailey Date: Fri, 16 Jan 2026 15:25:15 -0500 Subject: [PATCH 07/26] Update type_traits.hpp Callable entities from classes provide class type in type trait utility --- include/chevron/model/function/type_traits.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/chevron/model/function/type_traits.hpp b/include/chevron/model/function/type_traits.hpp index f07e626..bdf6eee 100644 --- a/include/chevron/model/function/type_traits.hpp +++ b/include/chevron/model/function/type_traits.hpp @@ -41,6 +41,7 @@ struct callable_signature { using ReturnType = ReturnT; using ArgsTuple = std::tuple; using FuncType = ReturnT (ClassType::*)(ArgsT...); + using Class = ClassType; }; /*! @@ -51,7 +52,8 @@ template struct callable_signature { using ReturnType = ReturnT; using ArgsTuple = std::tuple; - using FuncType = ReturnT (ClassType::*)(ArgsT...); + using FuncType = ReturnT (ClassType::*)(ArgsT...) const; + using Class = ClassType; }; /*! From 5bc03b94cddfaed0b0b4533f00002a9824e49dcb Mon Sep 17 00:00:00 2001 From: Jamon Bailey Date: Fri, 16 Jan 2026 15:31:43 -0500 Subject: [PATCH 08/26] Misc. Adjustments Renamed symbol visibility macro header to suffix with '.h' to be compatible with C sources; Adjusted 'info.h.in' and 'version.h.in' template files to avoid constantly invoking Clang-Format on generated source --- include/chevron/common/{export.hpp => export.h} | 2 +- lib/include/chevron_meta/info.h | 1 - lib/include/chevron_meta/templ/info.h.in | 1 - lib/include/chevron_meta/templ/version.h.in | 17 ++++++++--------- lib/include/chevron_meta/version.h | 17 ++++++++--------- 5 files changed, 17 insertions(+), 21 deletions(-) rename include/chevron/common/{export.hpp => export.h} (98%) diff --git a/include/chevron/common/export.hpp b/include/chevron/common/export.h similarity index 98% rename from include/chevron/common/export.hpp rename to include/chevron/common/export.h index a2aed92..f5b7b7d 100644 --- a/include/chevron/common/export.hpp +++ b/include/chevron/common/export.h @@ -5,7 +5,7 @@ // [ISJTB-CXX-XL20260108-000003] /*! - * @file export.hpp + * @file export.h * * @brief * Library symbol visibility macro definitions. diff --git a/lib/include/chevron_meta/info.h b/lib/include/chevron_meta/info.h index 6212cc3..84d4d26 100644 --- a/lib/include/chevron_meta/info.h +++ b/lib/include/chevron_meta/info.h @@ -9,7 +9,6 @@ * Metadata for Chevron. */ - #ifndef CHEVRON_SOFTWARE_IDENTITY_H_ #define CHEVRON_SOFTWARE_IDENTITY_H_ diff --git a/lib/include/chevron_meta/templ/info.h.in b/lib/include/chevron_meta/templ/info.h.in index aab9631..e71413b 100644 --- a/lib/include/chevron_meta/templ/info.h.in +++ b/lib/include/chevron_meta/templ/info.h.in @@ -9,7 +9,6 @@ * Metadata for @RESOLVED_SFTW_NAME@. */ - #ifndef @RESOLVED_SFTW_META_PREFIX@_SOFTWARE_IDENTITY_H_ #define @RESOLVED_SFTW_META_PREFIX@_SOFTWARE_IDENTITY_H_ diff --git a/lib/include/chevron_meta/templ/version.h.in b/lib/include/chevron_meta/templ/version.h.in index 2c860b1..47a202e 100644 --- a/lib/include/chevron_meta/templ/version.h.in +++ b/lib/include/chevron_meta/templ/version.h.in @@ -1,14 +1,13 @@ /*! -* @file version.h -* -* @brief -* Software version header. -* -* @details -* Version information for @RESOLVED_SFTW_NAME@. -*/ - + * @file version.h + * + * @brief + * Software version header. + * + * @details + * Version information for @RESOLVED_SFTW_NAME@. + */ #ifndef @RESOLVED_SFTW_META_PREFIX@_SOFTWARE_VERSION_H_ #define @RESOLVED_SFTW_META_PREFIX@_SOFTWARE_VERSION_H_ diff --git a/lib/include/chevron_meta/version.h b/lib/include/chevron_meta/version.h index e10fc8e..1b8a1bb 100644 --- a/lib/include/chevron_meta/version.h +++ b/lib/include/chevron_meta/version.h @@ -1,14 +1,13 @@ /*! -* @file version.h -* -* @brief -* Software version header. -* -* @details -* Version information for Chevron. -*/ - + * @file version.h + * + * @brief + * Software version header. + * + * @details + * Version information for Chevron. + */ #ifndef CHEVRON_SOFTWARE_VERSION_H_ #define CHEVRON_SOFTWARE_VERSION_H_ From 4fbbd3e69db1565030f508a052369a14d10be9c8 Mon Sep 17 00:00:00 2001 From: Jamon Bailey Date: Fri, 16 Jan 2026 15:31:59 -0500 Subject: [PATCH 09/26] Update dev_exe.cpp --- tests/cli/dev_exe.cpp | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/tests/cli/dev_exe.cpp b/tests/cli/dev_exe.cpp index df9ba2a..5b26920 100644 --- a/tests/cli/dev_exe.cpp +++ b/tests/cli/dev_exe.cpp @@ -1,5 +1,6 @@ #include +#include #include"chevron/model/function/func_args.hpp" #include"chevron/model/function/func_pointer.hpp" @@ -31,6 +32,8 @@ struct tester { void setValue(const int newVal) { value = newVal; } bool isMatch(const int val1, const int val2) const { return val1 == val2; } + int operator()() const { return value; } + int value; }; @@ -41,12 +44,19 @@ int main(int argc, char* argv[]) FuncArgs cmdlArgs{ argc, argv }; + auto lambda = [&cmdlArgs](const int val, const char& te) -> bool { + return val > 75; + }; + tester ggg{ 12 }; FuncArgs args{ 10, 10 }; FuncPtr demoCall{ demoMethod }; FuncPtr callPtr{ &ggg, &tester::isMatch }; + FuncPtr nCallPtr{ &ggg, &tester::setValue }; FuncPtr freeCall{ demoMethod2 }; + chevron::model::FuncPtr lambCall{lambda}; ///< Deduction issue here... + chevron::model::FuncPtr functCall{ ggg }; ///< Deduction issue here... FuncPtr noArgCall; if (freeCall) @@ -63,10 +73,18 @@ int main(int argc, char* argv[]) noArgCall(); callPtr(25, 16); + callPtr(args); + lambCall(12, 'C'); + functCall(); + + // + //\\// + + return 0; + + // FIX: Need specific constructor for lambda/functor using `::operator()`!!! // struct FunctionModel --> ReturnType & Arguments --> FuncPtr or Func // Static callable type? (No heap alloc) - - return 0; } From ce3c828c670a273531d8f5e1f7e03d82238b8b91 Mon Sep 17 00:00:00 2001 From: Jamon Bailey Date: Fri, 16 Jan 2026 21:38:15 -0500 Subject: [PATCH 10/26] Add chevron_EXPORTS Definition to C/C++ Build Configs Introduces the chevron_EXPORTS=1 compile definition when the chevron_EXPORTS variable is set for shared builds in both C and C++ CMake configurations. --- cmake/compiler/global_c.cmake | 4 ++++ cmake/compiler/global_cxx.cmake | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/cmake/compiler/global_c.cmake b/cmake/compiler/global_c.cmake index 879f45b..279ce6d 100644 --- a/cmake/compiler/global_c.cmake +++ b/cmake/compiler/global_c.cmake @@ -27,4 +27,8 @@ target_compile_definitions( $<$: CHEVRON_SHARED > + + $<$: + chevron_EXPORTS=1 + > ) diff --git a/cmake/compiler/global_cxx.cmake b/cmake/compiler/global_cxx.cmake index 4ec1e7a..29aba40 100644 --- a/cmake/compiler/global_cxx.cmake +++ b/cmake/compiler/global_cxx.cmake @@ -27,4 +27,8 @@ target_compile_definitions( $<$: CHEVRON_SHARED > + + $<$: + chevron_EXPORTS=1 + > ) From d4f8b2088039f99452c5ccff0e3f4f90a154acb4 Mon Sep 17 00:00:00 2001 From: Jamon Bailey Date: Fri, 16 Jan 2026 21:42:13 -0500 Subject: [PATCH 11/26] Refactor namespace usage in function model headers Changed namespace from chevron::model to chevron in func_args.hpp and func_pointer.hpp; Updated traits and concepts references to use model::traits and model::concepts for consistency; Minor comment and formatting improvements included --- include/chevron/model/function/func_args.hpp | 17 ++++++++--------- include/chevron/model/function/func_pointer.hpp | 16 ++++++++-------- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/include/chevron/model/function/func_args.hpp b/include/chevron/model/function/func_args.hpp index a685f9b..23a9d59 100644 --- a/include/chevron/model/function/func_args.hpp +++ b/include/chevron/model/function/func_args.hpp @@ -18,7 +18,7 @@ #include #include "chevron/model/function/concepts.hpp" -namespace chevron::model +namespace chevron { /*! @@ -49,9 +49,8 @@ class FuncArgs { (std::is_constructible_v && ...) && (!std::is_same_v, FuncArgs> && ...) ) - constexpr explicit FuncArgs(IncomingArgsT&&... arg) noexcept( - (std::is_nothrow_constructible_v && ...) - ) + constexpr explicit FuncArgs(IncomingArgsT&&... arg + ) noexcept((std::is_nothrow_constructible_v && ...)) : args{std::forward(arg)...} { // @@ -61,7 +60,7 @@ class FuncArgs { /*! @brief Get argument at specified index. */ template - requires(concepts::is_valid_args_index) + requires(model::concepts::is_valid_args_index) [[nodiscard]] constexpr decltype(auto) get() noexcept { return std::get(this->args); @@ -69,7 +68,7 @@ class FuncArgs { /*! @brief Get argument at specified index. */ template - requires(concepts::is_valid_args_index) + requires(model::concepts::is_valid_args_index) [[nodiscard]] constexpr decltype(auto) get() const noexcept { return std::get(this->args); @@ -92,7 +91,7 @@ class FuncArgs { Types args; }; -namespace traits +namespace model::traits { /*! @brief Function arguments structure conversion utility. */ @@ -109,7 +108,7 @@ struct to_funcargs> { template using to_funcargs_t = to_funcargs::type; -} // namespace traits +} // namespace model::traits /*! @details Function argument deduction guide. */ template @@ -118,6 +117,6 @@ FuncArgs(ArgsT&&...) -> FuncArgs...>; /*! @details Empty function argument deduction guide. */ FuncArgs() -> FuncArgs<>; -} // namespace chevron::model +} // namespace chevron #endif // CHEVRON_LIB_H_FUNCTION_ARGUMENTS_H_ diff --git a/include/chevron/model/function/func_pointer.hpp b/include/chevron/model/function/func_pointer.hpp index e154d85..9d4ff87 100644 --- a/include/chevron/model/function/func_pointer.hpp +++ b/include/chevron/model/function/func_pointer.hpp @@ -18,7 +18,7 @@ #include "chevron/model/function/func_args.hpp" #include "chevron/model/function/type_traits.hpp" -namespace chevron::model +namespace chevron { /*! @brief Base specialization template. */ @@ -153,9 +153,9 @@ FuncPtr(ClassType*, ReturnT (ClassType::*)(ArgsT...) const) /*! @details Lambda and functor deduction guide. */ template FuncPtr(Function&&) -> FuncPtr< - typename traits::callable_signature>::ReturnType, - traits::to_funcargs_t< - typename traits::callable_signature>::ArgsTuple>>; + typename model::traits::callable_signature>::ReturnType, + model::traits::to_funcargs_t< + typename model::traits::callable_signature>::ArgsTuple>>; // TODO: Lambda and functor deduction guide only works // when directly naming `FuncPtr` with it's fully @@ -165,10 +165,10 @@ FuncPtr(Function&&) -> FuncPtr< // NOTE: Is this because there is no `FuncPtr` constructor // that can construct a call to the `::operator()` -// method of the lambda/functor? Perhaps the reliance -// soley on the guide to properly make the appropriate -// type is the issue here. +// method of the lambda/functor? Perhaps the sole +// reliance on the guide to properly make the +// appropriate type is the issue here. -} // namespace chevron::model +} // namespace chevron #endif // CHEVRON_LIB_H_FUNCTION_POINTER_H_ From 7b393956c4c48ce279d60f053138c77ea91c00eb Mon Sep 17 00:00:00 2001 From: Jamon Bailey Date: Fri, 16 Jan 2026 21:50:08 -0500 Subject: [PATCH 12/26] Enable chevron_EXPORTS on some debug presets Added the 'chevron_EXPORTS' variable set to 'ON' in all Debug build presets for different compilers in CMakePresets.json to ensure consistent export behavior during debug builds. --- CMakePresets.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakePresets.json b/CMakePresets.json index 1025dc5..7192895 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -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", @@ -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", @@ -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", From 2e2619dd51337e3a75dccc92db979419ccb6a346 Mon Sep 17 00:00:00 2001 From: Jamon Bailey Date: Fri, 16 Jan 2026 21:50:12 -0500 Subject: [PATCH 13/26] Update Chevron_diagrams.drawio --- docs/prj/Chevron_diagrams.drawio | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/prj/Chevron_diagrams.drawio b/docs/prj/Chevron_diagrams.drawio index b50c7bc..f4e6cba 100644 --- a/docs/prj/Chevron_diagrams.drawio +++ b/docs/prj/Chevron_diagrams.drawio @@ -40,7 +40,7 @@ - + @@ -246,6 +246,12 @@ + + + + + + From 9c3b4c04803a742971bcc8f073614510da964567 Mon Sep 17 00:00:00 2001 From: Jamon Bailey Date: Fri, 16 Jan 2026 21:50:21 -0500 Subject: [PATCH 14/26] Update dev_exe.cpp --- tests/cli/dev_exe.cpp | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/tests/cli/dev_exe.cpp b/tests/cli/dev_exe.cpp index 5b26920..dea5279 100644 --- a/tests/cli/dev_exe.cpp +++ b/tests/cli/dev_exe.cpp @@ -3,12 +3,7 @@ #include #include"chevron/model/function/func_args.hpp" #include"chevron/model/function/func_pointer.hpp" - -template -using FuncArgs = chevron::model::FuncArgs; - -template -using FuncPtr = chevron::model::FuncPtr; +#include"chevron/common/export.h" bool demoMethod(int val1, int val2) { @@ -42,7 +37,7 @@ int main(int argc, char* argv[]) //\\// // - FuncArgs cmdlArgs{ argc, argv }; + chevron::FuncArgs cmdlArgs{ argc, argv }; auto lambda = [&cmdlArgs](const int val, const char& te) -> bool { return val > 75; @@ -50,14 +45,14 @@ int main(int argc, char* argv[]) tester ggg{ 12 }; - FuncArgs args{ 10, 10 }; - FuncPtr demoCall{ demoMethod }; - FuncPtr callPtr{ &ggg, &tester::isMatch }; - FuncPtr nCallPtr{ &ggg, &tester::setValue }; - FuncPtr freeCall{ demoMethod2 }; - chevron::model::FuncPtr lambCall{lambda}; ///< Deduction issue here... - chevron::model::FuncPtr functCall{ ggg }; ///< Deduction issue here... - FuncPtr noArgCall; + chevron::FuncArgs args{ 10, 10 }; + chevron::FuncPtr demoCall{ demoMethod }; + chevron::FuncPtr callPtr{ &ggg, &tester::isMatch }; + chevron::FuncPtr nCallPtr{ &ggg, &tester::setValue }; + chevron::FuncPtr freeCall{ demoMethod2 }; + chevron::FuncPtr lambCall{ lambda }; + chevron::FuncPtr functCall{ ggg }; + chevron::FuncPtr noArgCall; if (freeCall) std::cout << freeCall(false) << std::endl; From d60ac7e234fded2cc6a0490963e56901849a7a97 Mon Sep 17 00:00:00 2001 From: Jamon Bailey Date: Sat, 17 Jan 2026 14:15:45 -0500 Subject: [PATCH 15/26] General Function Include Header Introduces a new header providing type aliases for common callable function signatures with no arguments and various return types --- include/chevron/function.hpp | 57 ++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 include/chevron/function.hpp diff --git a/include/chevron/function.hpp b/include/chevron/function.hpp new file mode 100644 index 0000000..570f3b1 --- /dev/null +++ b/include/chevron/function.hpp @@ -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 + +namespace chevron +{ + +/*! @brief Callable function that accepts no arguments and returns void. */ +using VoidReturnNoArgs = FuncPtr; + +/*! @brief Callable function that accepts no arguments and returns a boolean. */ +using BoolReturnNoArgs = FuncPtr; + +/*! @brief Callable function that accepts no arguments and returns a character. */ +using CharReturnNoArgs = FuncPtr; + +/*! @brief Callable function that accepts no arguments and returns an integer. */ +using IntReturnNoArgs = FuncPtr; + +/*! @brief Callable function that accepts no arguments and returns a float. */ +using FloatReturnNoArgs = FuncPtr; + +/*! @brief Callable function that accepts no arguments and returns a double. */ +using DoubleReturnNoArgs = FuncPtr; + +/*! @brief Callable function that accepts no arguments and returns a const char pointer. */ +using CharPtrReturnNoArgs = FuncPtr; + +/*! @brief Callable function that accepts no arguments and returns a string. */ +using StringReturnNoArgs = FuncPtr; + +/*! @brief Callable function that accepts no arguments and returns size_t. */ +using SizeReturnNoArgs = FuncPtr; + +/*! @brief Callable function that accepts no arguments and returns specified type. */ +template +using NoArgsReturn = FuncPtr; + +} + +#endif // CHEVRON_LIB_HDR_FUNCTION_INCLUDE_H_ From 3dcfc89de6b77d2c6e1339eaedfbfb943c55c9e1 Mon Sep 17 00:00:00 2001 From: Jamon Bailey Date: Sat, 17 Jan 2026 14:22:52 -0500 Subject: [PATCH 16/26] Preparation For Library Binary Version Info resolving local technical issues, cannot permit SO version info on Linux/macOS yet --- src/CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 88094b6..19ae796 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -10,6 +10,16 @@ else() add_library(${CHEVRON_MAIN_BINARY_NAME} STATIC) endif() +#set_target_properties( +# ${CHEVRON_MAIN_BINARY_NAME} PROPERTIES +# +# SOVERSION +# ${CMAKE_PROJECT_VERSION_MAJOR} +# +# VERSION +# ${CMAKE_PROJECT_VERSION} +#) + target_include_directories( ${CHEVRON_MAIN_BINARY_NAME} From 58248d7dcd7752ec74d40ea1b3050f7b56a7f835 Mon Sep 17 00:00:00 2001 From: Jamon Bailey Date: Sat, 17 Jan 2026 14:25:17 -0500 Subject: [PATCH 17/26] Update dev_exe.cpp --- tests/cli/dev_exe.cpp | 72 ++++++------------------------------------- 1 file changed, 9 insertions(+), 63 deletions(-) diff --git a/tests/cli/dev_exe.cpp b/tests/cli/dev_exe.cpp index dea5279..ff5e46f 100644 --- a/tests/cli/dev_exe.cpp +++ b/tests/cli/dev_exe.cpp @@ -1,76 +1,22 @@ #include #include -#include"chevron/model/function/func_args.hpp" -#include"chevron/model/function/func_pointer.hpp" #include"chevron/common/export.h" +#include"chevron/function.hpp" -bool demoMethod(int val1, int val2) +int doNothing() { - return val1 == val2; + return 15; } -char demoMethod2(bool good) -{ - return 'G'; -} - -int demoMethod3() -{ - return 100; -} - -struct tester { - tester(const int initVal) : value{ initVal } {} - - int getVal() const { return value; } - void setValue(const int newVal) { value = newVal; } - bool isMatch(const int val1, const int val2) const { return val1 == val2; } - - int operator()() const { return value; } - - int value; -}; - int main(int argc, char* argv[]) { //\\// // - chevron::FuncArgs cmdlArgs{ argc, argv }; - - auto lambda = [&cmdlArgs](const int val, const char& te) -> bool { - return val > 75; - }; - - tester ggg{ 12 }; - - chevron::FuncArgs args{ 10, 10 }; - chevron::FuncPtr demoCall{ demoMethod }; - chevron::FuncPtr callPtr{ &ggg, &tester::isMatch }; - chevron::FuncPtr nCallPtr{ &ggg, &tester::setValue }; - chevron::FuncPtr freeCall{ demoMethod2 }; - chevron::FuncPtr lambCall{ lambda }; - chevron::FuncPtr functCall{ ggg }; - chevron::FuncPtr noArgCall; - - if (freeCall) - std::cout << freeCall(false) << std::endl; - - if (callPtr) - std::cout << callPtr(args) << std::endl; - - if (!noArgCall.bind(demoMethod3)) - return -1; - - if (!callPtr.bind(&ggg, &tester::isMatch)) - return -1; - - noArgCall(); - callPtr(25, 16); - callPtr(args); - lambCall(12, 'C'); - functCall(); + // Start... + chevron::IntReturnNoArgs ggg{doNothing}; + chevron::NoArgsReturn ddd{doNothing}; // //\\// @@ -78,8 +24,8 @@ int main(int argc, char* argv[]) return 0; // FIX: Need specific constructor for lambda/functor using `::operator()`!!! + // (`FuncPtr` class) - // struct FunctionModel --> ReturnType & Arguments --> FuncPtr or Func - - // Static callable type? (No heap alloc) + // struct CallableModel --> ReturnType & Arguments --> FuncPtr or Func + // Static callable type `Func`? (No heap alloc) } From 0c889e1f18ea816d07f024760c537625c38e89c3 Mon Sep 17 00:00:00 2001 From: Jamon Bailey <83630529+jamon-bailey@users.noreply.github.com> Date: Sat, 17 Jan 2026 20:22:08 -0500 Subject: [PATCH 18/26] Moved CMake Install Setup To Explicit Script Incomplete; Install setup for the Chevron library moved to explicit 'install_config.cmake' script to avoid clutter in /src/CMakeLists.txt file; Experienced issues on Windows attempting to build after specifying version information on the main library target (possibly local technical issues?) --- cmake/install_config.cmake | 25 ++++++++++++++++++ src/CMakeLists.txt | 52 ++++++++++++++++++++------------------ 2 files changed, 52 insertions(+), 25 deletions(-) create mode 100644 cmake/install_config.cmake diff --git a/cmake/install_config.cmake b/cmake/install_config.cmake new file mode 100644 index 0000000..e55a2b3 --- /dev/null +++ b/cmake/install_config.cmake @@ -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} +) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 19ae796..2ec36b7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -10,22 +10,23 @@ else() add_library(${CHEVRON_MAIN_BINARY_NAME} STATIC) endif() -#set_target_properties( -# ${CHEVRON_MAIN_BINARY_NAME} PROPERTIES -# -# SOVERSION -# ${CMAKE_PROJECT_VERSION_MAJOR} -# -# VERSION -# ${CMAKE_PROJECT_VERSION} -#) +# Set library package version properties +set_target_properties( + ${CHEVRON_MAIN_BINARY_NAME} PROPERTIES + + SOVERSION + ${CMAKE_PROJECT_VERSION_MAJOR} + + VERSION + ${CMAKE_PROJECT_VERSION} +) target_include_directories( ${CHEVRON_MAIN_BINARY_NAME} PUBLIC - "${CHEVRON_SOURCE_DIR}/include" - "${CHEVRON_LIBS_INCLUDE_DIR}" + "${CHEVRON_SOURCE_DIR}/include" + "${CHEVRON_LIBS_INCLUDE_DIR}" ) # Source directories @@ -37,34 +38,35 @@ if(${CHEVRON_CXX_GCC}) ${CHEVRON_MAIN_BINARY_NAME} PRIVATE - CHEVRON_gcc_cxx_bundle - CHEVRON_gcc_c_defines + CHEVRON_gcc_cxx_bundle + CHEVRON_gcc_c_defines ) elseif(${CHEVRON_CXX_CLANG}) target_link_libraries( ${CHEVRON_MAIN_BINARY_NAME} PRIVATE - CHEVRON_clang_cxx_bundle - CHEVRON_clang_c_defines + CHEVRON_clang_cxx_bundle + CHEVRON_clang_c_defines ) elseif(${CHEVRON_CXX_MSVC}) target_link_libraries( ${CHEVRON_MAIN_BINARY_NAME} PRIVATE - CHEVRON_msvc_cxx_bundle + CHEVRON_msvc_cxx_bundle ) endif() -# Setup installation of Chevron library -install( - TARGETS - ${CHEVRON_MAIN_BINARY_NAME} +if(Chevron_WX) + # Link to wxWidgets library + target_link_libraries( + ${CHEVRON_MAIN_BINARY_NAME} - COMPONENT CHEVRON - EXPORT ${CHEVRON_MAIN_BINARY_NAME}-targets + PUBLIC + wxwidgets_external + ) +endif() - RUNTIME - DESTINATION ${CMAKE_INSTALL_BINDIR} -) +# Setup installation of Chevron library +include("${CHEVRON_CMAKE_MODULES_DIR}/install_config.cmake") From e106c8a5e908977359175ccb2dfe6863bfb344ae Mon Sep 17 00:00:00 2001 From: Jamon Bailey <83630529+jamon-bailey@users.noreply.github.com> Date: Sat, 17 Jan 2026 20:23:15 -0500 Subject: [PATCH 19/26] Update install execute permissions given and is in my way (useless commit, I know) --- scripts/install | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 scripts/install diff --git a/scripts/install b/scripts/install old mode 100644 new mode 100755 From b40fdab71b78aea070107ba4a4856bdb6de4f9f6 Mon Sep 17 00:00:00 2001 From: Jamon Bailey <83630529+jamon-bailey@users.noreply.github.com> Date: Sun, 18 Jan 2026 15:22:27 -0500 Subject: [PATCH 20/26] Chevron Controls GUI FW Build Configuration Adjusted CMake scripts to remove external control of GUI framework binary build configuration, introduces too much complexity and opportunity for mistakes/confusion --- 3rdparty/wxWidgets/CMakeLists.txt | 2 +- cmake/utility/options.cmake | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/3rdparty/wxWidgets/CMakeLists.txt b/3rdparty/wxWidgets/CMakeLists.txt index 60ba0de..be0d896 100644 --- a/3rdparty/wxWidgets/CMakeLists.txt +++ b/3rdparty/wxWidgets/CMakeLists.txt @@ -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() diff --git a/cmake/utility/options.cmake b/cmake/utility/options.cmake index c710510..96190c0 100644 --- a/cmake/utility/options.cmake +++ b/cmake/utility/options.cmake @@ -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 -) From 0e53527feccf365ce32811a9caab28c80717aab4 Mon Sep 17 00:00:00 2001 From: Jamon Bailey <83630529+jamon-bailey@users.noreply.github.com> Date: Sun, 18 Jan 2026 17:48:05 -0500 Subject: [PATCH 21/26] Removed Invalid Source 2/2 Temporary stub entities now defined in explicit 'temp.hpp' and 'temp.cpp' files to prevent interference with development; Issue with build on Windows is suspected to be because of a lack of exported symbols which is likely causing the import library to not genereate (MSVC compiler), introduces explicit symbol to be exported --- include/chevron/temp/temp.hpp | 11 ++++++++++ src/CMakeLists.txt | 2 +- src/model/CMakeLists.txt | 11 ---------- src/model/function/func_pointer.cpp | 32 ----------------------------- src/temp/CMakeLists.txt | 11 ++++++++++ src/temp/temp.cpp | 6 ++++++ 6 files changed, 29 insertions(+), 44 deletions(-) create mode 100644 include/chevron/temp/temp.hpp delete mode 100644 src/model/CMakeLists.txt delete mode 100644 src/model/function/func_pointer.cpp create mode 100644 src/temp/CMakeLists.txt create mode 100644 src/temp/temp.cpp diff --git a/include/chevron/temp/temp.hpp b/include/chevron/temp/temp.hpp new file mode 100644 index 0000000..d16b3d4 --- /dev/null +++ b/include/chevron/temp/temp.hpp @@ -0,0 +1,11 @@ + +// NOTE: TEMPORARY HEADER + +#include "chevron/common/export.h" + +/*! @brief Stub class to allow generation of dll import lib. */ +class CHEVRON_API StubClass { +public: + /*! @brief Pointless method. */ + static void permitWin32ExportLib() noexcept; +}; diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2ec36b7..b92da9f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -30,7 +30,7 @@ target_include_directories( ) # Source directories -add_subdirectory(model) +add_subdirectory(temp) # NOTE: Temporary Stub Source # Conditionally link against compiler configuration if(${CHEVRON_CXX_GCC}) diff --git a/src/model/CMakeLists.txt b/src/model/CMakeLists.txt deleted file mode 100644 index ea2b744..0000000 --- a/src/model/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ - -#====================================== -# /src/model Directory Script -#====================================== - -target_sources( - ${CHEVRON_MAIN_BINARY_NAME} - - PUBLIC - "${CMAKE_CURRENT_SOURCE_DIR}/function/func_pointer.cpp" -) diff --git a/src/model/function/func_pointer.cpp b/src/model/function/func_pointer.cpp deleted file mode 100644 index 30cc7cf..0000000 --- a/src/model/function/func_pointer.cpp +++ /dev/null @@ -1,32 +0,0 @@ - -// 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] - -#include "chevron/model/function/func_pointer.hpp" - -// chevron::model::FuncPtr : CONSTRUCTOR -// chevron::model::FuncPtr : CONSTRUCTOR END! - -// chevron::model::FuncPtr : DESTRUCTOR - - -// chevron::model::FuncPtr : STATIC -// chevron::model::FuncPtr : STATIC END! - - -// chevron::model::FuncPtr : OPERATOR -// chevron::model::FuncPtr : OPERATOR END! - - -// chevron::model::FuncPtr : PUBLIC -// chevron::model::FuncPtr : PUBLIC END! - - -// chevron::model::FuncPtr : PROTECTED -// chevron::model::FuncPtr : PROTECTED END! - - -// chevron::model::FuncPtr : PRIVATE -// chevron::model::FuncPtr : PRIVATE END! diff --git a/src/temp/CMakeLists.txt b/src/temp/CMakeLists.txt new file mode 100644 index 0000000..e28093b --- /dev/null +++ b/src/temp/CMakeLists.txt @@ -0,0 +1,11 @@ + +#===================================== +# /src/temp Directory Script +#===================================== + +target_sources( + ${CHEVRON_MAIN_BINARY_NAME} + + PUBLIC + "${CMAKE_CURRENT_SOURCE_DIR}/temp.cpp" +) diff --git a/src/temp/temp.cpp b/src/temp/temp.cpp new file mode 100644 index 0000000..e4f8205 --- /dev/null +++ b/src/temp/temp.cpp @@ -0,0 +1,6 @@ + +// NOTE: TEMPORARY STUB SOURCE + +#include "chevron/temp/temp.hpp" + +void StubClass::permitWin32ExportLib() noexcept { /* Does nothing */ } From 2111e61a5c50c2d7f43fa71cd1edac8457bb3868 Mon Sep 17 00:00:00 2001 From: Jamon Bailey <83630529+jamon-bailey@users.noreply.github.com> Date: Thu, 22 Jan 2026 21:20:29 -0500 Subject: [PATCH 22/26] ProgInstance Initial Incomplete; Initial implementation of process program structure; Removes temporary source --- include/chevron/process/program/runtime.hpp | 29 +++++++++++++++++++ include/chevron/temp/temp.hpp | 11 ------- src/CMakeLists.txt | 2 +- src/process/CMakeLists.txt | 11 +++++++ src/process/program/runtime.cpp | 32 +++++++++++++++++++++ src/temp/CMakeLists.txt | 11 ------- src/temp/temp.cpp | 6 ---- 7 files changed, 73 insertions(+), 29 deletions(-) create mode 100644 include/chevron/process/program/runtime.hpp delete mode 100644 include/chevron/temp/temp.hpp create mode 100644 src/process/CMakeLists.txt create mode 100644 src/process/program/runtime.cpp delete mode 100644 src/temp/CMakeLists.txt delete mode 100644 src/temp/temp.cpp diff --git a/include/chevron/process/program/runtime.hpp b/include/chevron/process/program/runtime.hpp new file mode 100644 index 0000000..015f74a --- /dev/null +++ b/include/chevron/process/program/runtime.hpp @@ -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 runtime.hpp + * + * @brief + * Declaration of process-level graphical user interface + * application runtime. + */ + +#ifndef CHEVRON_CORE_LIB_PROC_GUI_RUNTIME_H_ +#define CHEVRON_CORE_LIB_PROC_GUI_RUNTIME_H_ + +namespace chevron::process +{ + +class ProgInstance { +public: + ProgInstance() noexcept = default; + ~ProgInstance() noexcept = default; +}; + +} // namespace chevron::process + +#endif // CHEVRON_CORE_LIB_PROC_GUI_RUNTIME_H_ diff --git a/include/chevron/temp/temp.hpp b/include/chevron/temp/temp.hpp deleted file mode 100644 index d16b3d4..0000000 --- a/include/chevron/temp/temp.hpp +++ /dev/null @@ -1,11 +0,0 @@ - -// NOTE: TEMPORARY HEADER - -#include "chevron/common/export.h" - -/*! @brief Stub class to allow generation of dll import lib. */ -class CHEVRON_API StubClass { -public: - /*! @brief Pointless method. */ - static void permitWin32ExportLib() noexcept; -}; diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b92da9f..cfebede 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -30,7 +30,7 @@ target_include_directories( ) # Source directories -add_subdirectory(temp) # NOTE: Temporary Stub Source +add_subdirectory(process) # Conditionally link against compiler configuration if(${CHEVRON_CXX_GCC}) diff --git a/src/process/CMakeLists.txt b/src/process/CMakeLists.txt new file mode 100644 index 0000000..f865268 --- /dev/null +++ b/src/process/CMakeLists.txt @@ -0,0 +1,11 @@ + +#======================================== +# /src/process Directory Script +#======================================== + +target_sources( + ${CHEVRON_MAIN_BINARY_NAME} + + PUBLIC + "${CMAKE_CURRENT_SOURCE_DIR}/program/runtime.cpp" +) diff --git a/src/process/program/runtime.cpp b/src/process/program/runtime.cpp new file mode 100644 index 0000000..dd07269 --- /dev/null +++ b/src/process/program/runtime.cpp @@ -0,0 +1,32 @@ + +// 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] + +#include "chevron/process/program/runtime.hpp" + +// chevron::process::ProgInstance : CONSTRUCTOR +// chevron::process::ProgInstance : CONSTRUCTOR END! + +// chevron::process::ProgInstance : DESTRUCTOR + + +// chevron::process::ProgInstance : STATIC +// chevron::process::ProgInstance : STATIC END! + + +// chevron::process::ProgInstance : OPERATOR +// chevron::process::ProgInstance : OPERATOR END! + + +// chevron::process::ProgInstance : PUBLIC +// chevron::process::ProgInstance : PUBLIC END! + + +// chevron::process::ProgInstance : PROTECTED +// chevron::process::ProgInstance : PROTECTED END! + + +// chevron::process::ProgInstance : PRIVATE +// chevron::process::ProgInstance : PRIVATE END! diff --git a/src/temp/CMakeLists.txt b/src/temp/CMakeLists.txt deleted file mode 100644 index e28093b..0000000 --- a/src/temp/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ - -#===================================== -# /src/temp Directory Script -#===================================== - -target_sources( - ${CHEVRON_MAIN_BINARY_NAME} - - PUBLIC - "${CMAKE_CURRENT_SOURCE_DIR}/temp.cpp" -) diff --git a/src/temp/temp.cpp b/src/temp/temp.cpp deleted file mode 100644 index e4f8205..0000000 --- a/src/temp/temp.cpp +++ /dev/null @@ -1,6 +0,0 @@ - -// NOTE: TEMPORARY STUB SOURCE - -#include "chevron/temp/temp.hpp" - -void StubClass::permitWin32ExportLib() noexcept { /* Does nothing */ } From 8480dd78f2be210733f646f0ecbecf0d89121696 Mon Sep 17 00:00:00 2001 From: Jamon Bailey <83630529+jamon-bailey@users.noreply.github.com> Date: Thu, 22 Jan 2026 21:21:19 -0500 Subject: [PATCH 23/26] Chevron Diagrams Update Updates made to library diagrams document --- docs/prj/Chevron_diagrams.drawio | 1216 ++++++++++++++++-------------- 1 file changed, 656 insertions(+), 560 deletions(-) diff --git a/docs/prj/Chevron_diagrams.drawio b/docs/prj/Chevron_diagrams.drawio index f4e6cba..6f3df7d 100644 --- a/docs/prj/Chevron_diagrams.drawio +++ b/docs/prj/Chevron_diagrams.drawio @@ -1,4 +1,4 @@ - + @@ -40,59 +40,59 @@ - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - + - + - + - + - - + + - - + + - - + + - + @@ -100,16 +100,16 @@ - - + + - - + + - - + + - + @@ -117,16 +117,16 @@ - - + + - - + + - - + + - + @@ -134,19 +134,19 @@ - + - - + + - - + + - - + + - + @@ -154,16 +154,16 @@ - - + + - - + + - - + + - + @@ -171,16 +171,16 @@ - - + + - - + + - - + + - + @@ -188,16 +188,16 @@ - - + + - - + + - - + + - + @@ -205,31 +205,31 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + @@ -237,748 +237,844 @@ - - + + - - + + - - + + - - + + - - + + + + + - + - - + + - - + + - - - + + + - - - + + + - - + + - - + + - - + + - - + + - - + + - - + + - - - + + + - - + + - - + + - - - + + + - - + + - - - + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - + + + - - + + - - + + - - - + + + - - - + + + - - + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - + - - - + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - - + + + - - + + - - + + - - - + + + - - + + - - - + + + - - + + - - + + - - + + - - + + - - + + - - - + + + - - + + - - - + + + - - + + - - + + - - + + - - - + + + - - - + + + - - + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - - + + + - - + + - - + + - - - + + + - - + + - - - + + + - - + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - - + + + - - + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - - + + + - - + + - - + + - - - + + + - - + + - - - + + + - - + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - + + - - - + + + - - + + - - - + + + - - + + + + + - - - + + + - - + + + + + + + + + + + + + + + + + + + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - + + + + + + + - - - + + + - - + + - - - + + + - - + + + + + + + + + + + - - - + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - + + - - + + - - + + - - - + + + - - + + From 88adb76bfabd47f6766613d402d85069faadaed7 Mon Sep 17 00:00:00 2001 From: Jamon Bailey <83630529+jamon-bailey@users.noreply.github.com> Date: Thu, 22 Jan 2026 21:26:32 -0500 Subject: [PATCH 24/26] Update function.hpp Renamed "CharPtrReturnNoArgs" to a more appropriately title: "CstrReturnNoArgs". Conveys what is returned better; Small cosmetic tweaks --- include/chevron/function.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/chevron/function.hpp b/include/chevron/function.hpp index 570f3b1..42ffcc3 100644 --- a/include/chevron/function.hpp +++ b/include/chevron/function.hpp @@ -14,9 +14,9 @@ #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 +#include "chevron/model/function/func_args.hpp" +#include "chevron/model/function/func_pointer.hpp" +#include namespace chevron { @@ -40,7 +40,7 @@ using FloatReturnNoArgs = FuncPtr; using DoubleReturnNoArgs = FuncPtr; /*! @brief Callable function that accepts no arguments and returns a const char pointer. */ -using CharPtrReturnNoArgs = FuncPtr; +using CstrReturnNoArgs = FuncPtr; /*! @brief Callable function that accepts no arguments and returns a string. */ using StringReturnNoArgs = FuncPtr; @@ -52,6 +52,6 @@ using SizeReturnNoArgs = FuncPtr; template using NoArgsReturn = FuncPtr; -} +} // namespace chevron #endif // CHEVRON_LIB_HDR_FUNCTION_INCLUDE_H_ From 19f8698b4365d446382d386c6d9a194afa41bb16 Mon Sep 17 00:00:00 2001 From: Jamon Bailey <83630529+jamon-bailey@users.noreply.github.com> Date: Thu, 22 Jan 2026 22:07:45 -0500 Subject: [PATCH 25/26] ProgInstance Export Correction Added symbol export (because I somehow forgot). This is only necessary for successful builds on Windows platform, a DLL export library needs to be generated to avoid issues --- include/chevron/process/program/runtime.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/chevron/process/program/runtime.hpp b/include/chevron/process/program/runtime.hpp index 015f74a..c484e34 100644 --- a/include/chevron/process/program/runtime.hpp +++ b/include/chevron/process/program/runtime.hpp @@ -15,10 +15,12 @@ #ifndef CHEVRON_CORE_LIB_PROC_GUI_RUNTIME_H_ #define CHEVRON_CORE_LIB_PROC_GUI_RUNTIME_H_ +#include "chevron/common/export.h" + namespace chevron::process { -class ProgInstance { +class CHEVRON_API ProgInstance { public: ProgInstance() noexcept = default; ~ProgInstance() noexcept = default; From 44c904d44e869ea201a6c22cd4db50131988de53 Mon Sep 17 00:00:00 2001 From: Jamon Bailey Date: Fri, 23 Jan 2026 22:35:23 -0500 Subject: [PATCH 26/26] Updated Function Concepts Use of two variadic template packs back-to-back does not conform to standard C++ and requires a permissive compiler, which is undesirable for this project. This particular concept was not in use at time of deletion due to unrelated issues attempting to integrate it at its designated point; This removal also fixes the previous failures from Workflow runner build tests --- include/chevron/model/function/concepts.hpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/include/chevron/model/function/concepts.hpp b/include/chevron/model/function/concepts.hpp index 74ac7be..45a4153 100644 --- a/include/chevron/model/function/concepts.hpp +++ b/include/chevron/model/function/concepts.hpp @@ -20,13 +20,6 @@ namespace chevron::model::concepts { -/*! @brief Concepts that validates construction of function arguments. */ -template -concept is_viable_function_arguments = - (sizeof...(IncomingArgsT) == sizeof...(ArgsT)) && - (std::is_constructible_v && ...) && - (!std::is_same_v, FuncArgsT> && ...); - /*! @brief Concept that validates indexing into function parameters. */ template concept is_valid_args_index = Index >= 0 && Index < sizeof...(ArgsT);