Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

CppClass adds ": public" to class even though no parent is defined #29

Copy link
Copy link
@grarup

Description

@grarup
Issue body actions

I'm trying to generate a struct with out a parent and is getting the following result. the ": public" should not be there. Besides it looks a little strange with a extra newline between all variables.

python

        test_class = CppClass(name="test", is_struct=True)
        test_class.add_variable(CppVariable(name="foo", type="int"))
        test_class.add_variable(CppVariable(name="bar", type="int"))

result

	struct test  : public 
	{
		
		int foo;
		
		int bar;
		
	};

env

Python 3.10.12

Name: code-generation
Version: 2.3.0
Summary: Provides functionality of generating source code programmatically
Home-page: https://github.com/yuchdev/code_generator
Author: Yurii Cherkasov
Author-email: strategarius@protonmail.com
License:
Location: /home/dev/.local/lib/python3.10/site-packages
Requires: pathlib
Required-by:

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.