CPP-TOOLBOX
Loading...
Searching...
No Matches
meta_utils.cpp File Reference
#include "meta_utils.hpp"
#include <filesystem>
#include <iostream>
#include <optional>
#include <tuple>
#include <vector>
#include <algorithm>

Namespaces

namespace  meta_utils
 

Functions

std::string meta_utils::create_local_include (const std::string &path)
 
std::vector< float > meta_utils::parse_vector_of_type (const std::string &input)
 
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)
 
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::resolve_meta_type (const std::string &type_str, const MetaTypes &types)
 
MetaClass meta_utils::create_meta_class_or_struct_from_source (const std::string &source, cpp_parsing::CharParserPtr def_parser, const std::string &unnamed_fallback, const std::string &kind)
 
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)
 
meta_utils::MetaEnum meta_utils::create_meta_enum_from_source (const std::string &source)
 
std::string meta_utils::to_string_function_name (const std::string &type)
 
std::string meta_utils::from_string_function_name (const std::string &type)
 
std::string meta_utils::serialize_function_name (const std::string &type)
 
std::string meta_utils::size_when_serialized_function_name (const std::string &type)
 
std::string meta_utils::deserialize_function_name (const std::string &type)
 
MetaType meta_utils::construct_class_metatype (const MetaClass &cls, const MetaTypes &types)
 
MetaType meta_utils::construct_enum_metatype (const MetaEnum &enu, const MetaTypes &types)
 
std::vector< std::string > meta_utils::split_template_args (const std::string &s)
 
std::string meta_utils::trim (const std::string &s)
 
std::vector< std::string > meta_utils::split_args (const std::string &args_str)
 
std::string meta_utils::simplify_parameter (const std::string &param_str)
 
std::string meta_utils::generate_regex_to_match_valid_invocation_of_func (const std::string &signature)
 
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_string_invoker_for_function_with_string_return_type (const MetaFunctionSignature &sig)
 
StringToTypeConversions meta_utils::get_code_to_generate_invocation (const std::vector< MetaParameter > &params)
 
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::join (const std::vector< std::string > &v, const std::string &sep)
 
std::vector< MetaFunctionmeta_utils::generate_string_invokers_to_string (std::vector< MetaFunction > mfs)
 
std::vector< MetaFunctionmeta_utils::generate_string_invokers_to_string (std::vector< MetaFunctionSignature > mfss)
 
std::vector< MetaVariablemeta_utils::generate_meta_function_signature_variables (std::vector< MetaFunction > meta_functions)
 
std::vector< MetaVariablemeta_utils::generate_meta_function_signature_variables (std::vector< MetaFunctionSignature > mfss)
 
std::vector< MetaFunctionmeta_utils::generate_string_invokers (std::vector< MetaFunction > mfs)
 
std::vector< MetaFunctionmeta_utils::generate_string_invokers (std::vector< MetaFunctionSignature > mfss)
 
std::vector< std::string > meta_utils::generate_type_grouped_invokers (const std::vector< meta_utils::MetaFunctionSignature > &mfss, bool create_top_level_invoker)
 
std::string meta_utils::sanitize_type (const std::string &type_str)
 
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)
 
MetaFunction meta_utils::create_list_all_available_functions (std::vector< MetaCodeCollection > &generated_mcc_for_each_header_source_pair)
 
MetaFunction meta_utils::create_interactive_invoker (std::vector< MetaCodeCollection > &generated_mcc_for_each_header_source_pair)
 
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)
 
std::string meta_utils::lambda_to_function (const std::string &lambda_str, const std::string &func_name, const std::string &return_type)
 
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)
 
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)
 
MetaFunction meta_utils::generate_interactive_invoker ()
 

Variables

std::unordered_map< char, char > meta_utils::replacement_map = {{':', '_'}, {' ', '_'}}