CPP-TOOLBOX
Loading...
Searching...
No Matches
cpp_utils.main Namespace Reference

Classes

class  CppClass
 
class  CppHeaderAndSource
 
class  CppMember
 
class  CppMethod
 
class  CppParameter
 
class  CppStruct
 
class  CppType
 

Functions

 camel_to_snake_case (camel_str)
 
Tuple[List[str], List[str]] get_public_and_private_methods_for_header (str class_name, List[CppMethod] methods)
 
str generate_header_content_for_class_or_struct (bool is_class, str class_or_struct_name, List[CppMember] members, List[CppMethod] methods)
 
str generate_source_content_for_class_or_struct (str class_or_struct_name, List[CppMethod] methods)
 

Variables

 cpp_header_and_source = CppHeaderAndSource("example_file")
 
 cpp_struct = CppStruct("ExampleStruct")
 
 cpp_class = CppClass("ExampleClass")
 

Function Documentation

◆ camel_to_snake_case()

cpp_utils.main.camel_to_snake_case ( camel_str)
Convert a camelCase or PascalCase string to snake_case.

Handles cases with letters and digits, ensuring underscores are 
added appropriately between camelCase segments and numbers.

Args:
    camel_str (str): The camelCase or PascalCase string.

Returns:
    str: The snake_case version of the string.

◆ generate_header_content_for_class_or_struct()

str cpp_utils.main.generate_header_content_for_class_or_struct ( bool is_class,
str class_or_struct_name,
List[CppMember] members,
List[CppMethod] methods )

◆ generate_source_content_for_class_or_struct()

str cpp_utils.main.generate_source_content_for_class_or_struct ( str class_or_struct_name,
List[CppMethod] methods )

◆ get_public_and_private_methods_for_header()

Tuple[List[str], List[str]] cpp_utils.main.get_public_and_private_methods_for_header ( str class_name,
List[CppMethod] methods )
this function gets public and private method strings for a class.
note that this was pulled out as both structs and classes use this

Variable Documentation

◆ cpp_class

cpp_utils.main.cpp_class = CppClass("ExampleClass")

◆ cpp_header_and_source

cpp_utils.main.cpp_header_and_source = CppHeaderAndSource("example_file")

◆ cpp_struct

cpp_utils.main.cpp_struct = CppStruct("ExampleStruct")