|
| 1 | + |
| 2 | +// Copyright (C) 2026 by Jamon T. Bailey and InfinSys, LLC. All rights reserved. |
| 3 | +// Released under the terms of the GNU Affero General Public License version 3 |
| 4 | + |
| 5 | +// [ISJTB-CXX-XL20260108-000003] |
| 6 | + |
| 7 | +/*! |
| 8 | + * @file function.hpp |
| 9 | + * |
| 10 | + * @brief |
| 11 | + * General include header for function related facilities. |
| 12 | + */ |
| 13 | + |
| 14 | +#ifndef CHEVRON_LIB_HDR_FUNCTION_INCLUDE_H_ |
| 15 | +#define CHEVRON_LIB_HDR_FUNCTION_INCLUDE_H_ |
| 16 | + |
| 17 | +#include "chevron/model/function/func_args.hpp" |
| 18 | +#include "chevron/model/function/func_pointer.hpp" |
| 19 | +#include <string> |
| 20 | + |
| 21 | +namespace chevron |
| 22 | +{ |
| 23 | + |
| 24 | +/*! @brief Callable function that accepts no arguments and returns void. */ |
| 25 | +using VoidReturnNoArgs = FuncPtr<void>; |
| 26 | + |
| 27 | +/*! @brief Callable function that accepts no arguments and returns a boolean. */ |
| 28 | +using BoolReturnNoArgs = FuncPtr<bool>; |
| 29 | + |
| 30 | +/*! @brief Callable function that accepts no arguments and returns a character. */ |
| 31 | +using CharReturnNoArgs = FuncPtr<char>; |
| 32 | + |
| 33 | +/*! @brief Callable function that accepts no arguments and returns an integer. */ |
| 34 | +using IntReturnNoArgs = FuncPtr<int>; |
| 35 | + |
| 36 | +/*! @brief Callable function that accepts no arguments and returns a float. */ |
| 37 | +using FloatReturnNoArgs = FuncPtr<float>; |
| 38 | + |
| 39 | +/*! @brief Callable function that accepts no arguments and returns a double. */ |
| 40 | +using DoubleReturnNoArgs = FuncPtr<double>; |
| 41 | + |
| 42 | +/*! @brief Callable function that accepts no arguments and returns a const char pointer. */ |
| 43 | +using CstrReturnNoArgs = FuncPtr<const char*>; |
| 44 | + |
| 45 | +/*! @brief Callable function that accepts no arguments and returns a string. */ |
| 46 | +using StringReturnNoArgs = FuncPtr<std::string>; |
| 47 | + |
| 48 | +/*! @brief Callable function that accepts no arguments and returns size_t. */ |
| 49 | +using SizeReturnNoArgs = FuncPtr<size_t>; |
| 50 | + |
| 51 | +/*! @brief Callable function that accepts no arguments and returns specified type. */ |
| 52 | +template <typename ReturnT> |
| 53 | +using NoArgsReturn = FuncPtr<ReturnT>; |
| 54 | + |
| 55 | +} // namespace chevron |
| 56 | + |
| 57 | +#endif // CHEVRON_LIB_HDR_FUNCTION_INCLUDE_H_ |
0 commit comments