CPP-TOOLBOX
Loading...
Searching...
No Matches
meta_utils.hpp File Reference
#include <fstream>
#include <iostream>
#include <iterator>
#include <optional>
#include <set>
#include <sstream>
#include <stdexcept>
#include <string>
#include <unordered_set>
#include <vector>
#include <functional>
#include <cstddef>
#include <variant>
#include "sbpt_generated_includes.hpp"

Go to the source code of this file.

Classes

class  meta_utils::MetaInclude
 Represents an include directive for C++ source code, providing control over whether it is a system or local include. More...
 
class  meta_utils::MetaType
 
class  meta_utils::MetaParameter
 
class  meta_utils::MetaFunctionSignature
 
class  meta_utils::MetaVariable
 
class  meta_utils::MetaFunction
 
class  meta_utils::MetaAttribute
 
class  meta_utils::MetaMethod
 
class  meta_utils::MetaConstructor
 
class  meta_utils::MetaEnum
 
class  meta_utils::MetaClass
 
class  meta_utils::MetaCodeCollection
 
class  meta_utils::MetaFunctionInvocation
 
struct  meta_utils::StringToTypeConversions
 
struct  meta_utils::CustomTypeExtractionSettings
 
struct  meta_utils::StringInvokerGenerationSettingsForHeaderSource
 
class  meta_utils::MetaTypes
 
struct  std::hash< meta_utils::MetaType >
 

Namespaces

namespace  meta_utils
 
namespace  std
 

Concepts

concept  meta_utils::HasNameAndNamespace
 

Typedefs

using meta_utils::MetaTemplateParameter = std::variant<unsigned int, MetaType>
 

Enumerations

enum class  meta_utils::AccessSpecifier { meta_utils::Public , meta_utils::Protected , meta_utils::Private }
 
enum class  meta_utils::FilterMode { meta_utils::None , meta_utils::Whitelist , meta_utils::Blacklist }
 

Functions

std::string meta_utils::create_to_string_lambda (std::string type)
 
std::string meta_utils::create_string_to_vector_of_type_func (MetaType type_parameter)
 
std::string meta_utils::create_vector_of_type_to_string_func (MetaType type_parameter)
 
std::string meta_utils::create_vector_of_type_serialize_func (MetaType type_parameter)
 
std::string meta_utils::create_vector_of_type_serialized_size_func (MetaType type_parameter)
 
std::string meta_utils::create_vector_of_type_deserialize_func (MetaType type_parameter)
 
std::string meta_utils::create_string_to_array_of_type_func (MetaType type_parameter, unsigned int size)
 
std::string meta_utils::create_array_of_type_to_string_func (MetaType type_parameter, unsigned int size)
 
std::string meta_utils::create_array_of_type_serialize_func (MetaType type_parameter, unsigned int size)
 
std::string meta_utils::create_array_of_type_serialized_size_func (MetaType type_parameter, unsigned int size)
 
std::string meta_utils::create_array_of_type_deserialize_func (MetaType type_parameter, unsigned int size)
 
MetaType meta_utils::construct_vector_metatype (MetaType generic_type)
 
MetaType meta_utils::construct_array_metatype (MetaType generic_type, unsigned int size)
 
std::string meta_utils::create_string_to_unordered_map_func (MetaType key_type, MetaType value_type)
 
std::string meta_utils::create_unordered_map_to_string_func (MetaType key_type, MetaType value_type)
 
std::string meta_utils::create_unordered_map_serialize_func (MetaType key_type, MetaType value_type)
 
std::string meta_utils::create_unordered_map_serialized_size_func (MetaType key_type, MetaType value_type)
 
std::string meta_utils::create_unordered_map_deserialize_func (MetaType key_type, MetaType value_type)
 
MetaType meta_utils::construct_unordered_map_metatype (MetaType key_type, MetaType value_type)
 
std::unordered_map< std::string, MetaTypemeta_utils::create_type_name_to_meta_type_map (std::vector< MetaType > meta_types)
 
std::optional< MetaTypemeta_utils::parse_meta_type_from_string (const std::string &type_str)
 
std::string meta_utils::clean_type_string (const std::string &raw_type)
 
std::string meta_utils::generate_regex_to_match_valid_invocation_of_func (const std::string &signature)
 
template<HasNameAndNamespace T>
std::string meta_utils::get_fully_qualified_name (const T &obj)
 
std::string meta_utils::to_string (AccessSpecifier access)
 
bool meta_utils::is_system_header (const std::string &line)
 
bool meta_utils::is_local_header (const std::string &line)
 
std::vector< std::string > meta_utils::get_system_headers (const std::vector< std::string > &headers)
 
std::string meta_utils::generate_string_invoker_for_function_with_string_return_type (const MetaFunctionSignature &sig)
 
std::string meta_utils::generate_string_invoker_for_function (const MetaFunctionSignature &sig, const std ::string &func_postfix="_string_invoker")
 Generate an invoker function from it's meta function signature.
 
std::string meta_utils::generate_deferred_string_invoker_for_function (const MetaFunctionSignature &sig, const std ::string &func_postfix="_deferred_string_invoker")
 Generate a deferred invoker function from it's meta function signature.
 
std::string meta_utils::generate_string_invoker_for_function_collection_that_has_same_return_type (std::vector< MetaFunctionSignature > mfss_with_same_return_type, std::string return_type, std::string func_postfix)
 
std::string meta_utils::generate_deferred_string_invoker_for_function_collection_that_has_same_return_type (std::vector< MetaFunctionSignature > mfss_with_same_return_type, std::string return_type, std::string func_postfix)
 
void meta_utils::register_custom_types_into_meta_types (const std::vector< CustomTypeExtractionSettings > &settings_list)
 
void meta_utils::register_custom_types_into_meta_types (const CustomTypeExtractionSettings &custom_type_extraction_settings)
 
void meta_utils::generate_string_invokers_program_wide (std::vector< StringInvokerGenerationSettingsForHeaderSource > settings, const std::vector< MetaType > &all_types)
 generates the meta program
 
MetaCodeCollection meta_utils::generate_string_invokers_from_header_and_source (const StringInvokerGenerationSettingsForHeaderSource &sigsfhs)
 
MetaCodeCollection meta_utils::generate_string_invokers_from_header_and_source (const std::string &input_header_path, const std::string &input_source_path, bool create_top_level_invoker, bool create_type_grouped_invokers, const std::vector< std::string > &string_signatures_to_filter_on, FilterMode mode)
 
MetaFunction meta_utils::generate_interactive_invoker ()
 
MetaType meta_utils::resolve_meta_type (const std::string &type_str, const MetaTypes &types)
 
meta_utils::MetaClass meta_utils::create_meta_class_from_source (const std::string &source)
 
meta_utils::MetaClass meta_utils::create_meta_struct_from_source (const std::string &source)
 
meta_utils::MetaType meta_utils::create_meta_type_from_using (const std::string &source, const meta_utils::MetaTypes &types)
 
MetaType meta_utils::construct_class_metatype (const MetaClass &cls, const MetaTypes &types)
 
void hash_combine (std::size_t &seed, std::size_t value) noexcept
 

Variables

MetaType meta_utils::UNSIGNED_INT
 
MetaType meta_utils::UINT8_T
 
MetaType meta_utils::UINT32_T
 
MetaType meta_utils::SIZE_T
 
MetaType meta_utils::CHAR
 
MetaType meta_utils::INT
 
MetaType meta_utils::SHORT
 
MetaType meta_utils::LONG
 
MetaType meta_utils::FLOAT
 
MetaType meta_utils::DOUBLE
 
MetaType meta_utils::STRING
 
MetaType meta_utils::FILESYSTEM_PATH
 
MetaType meta_utils::REGEX
 
MetaType meta_utils::BOOL
 
meta_utils::MetaType meta_utils::meta_type_type ("meta_utils::MetaType", "[](){}", "[](){ return \"\";}", "[](){}", "[](const meta_utils::MetaType &v) { return sizeof(meta_utils::MetaType); }", "[](){}", "MetaType")
 
std::vector< MetaTypemeta_utils::concrete_types
 
std::unordered_map< std::string, std::function< MetaType(std::vector< MetaTemplateParameter >)> > meta_utils::generic_type_to_metatype_constructor
 
std::string meta_utils::vector_include = "#include <vector>"
 
std::string meta_utils::string_include = "#include <string>"
 
std::string meta_utils::optional_include = "#include <optional>"
 
std::string meta_utils::regex_include = "#include <regex>"
 
MetaTypes meta_utils::meta_types
 

Function Documentation

◆ hash_combine()

void hash_combine ( std::size_t & seed,
std::size_t value )
inlinenoexcept