Skip to content

Add support for generating structs#59

Open
martonmiklos wants to merge 1 commit intocornelius:masterfrom
martonmiklos:add_structs
Open

Add support for generating structs#59
martonmiklos wants to merge 1 commit intocornelius:masterfrom
martonmiklos:add_structs

Conversation

@martonmiklos
Copy link
Collaborator

I use the libkode for C code generation and I needed to generate structs to files.
It could came handy to others for similar purposes.

void addStruct(const KODE::Struct &structValue);

/**
* Returns the list of all file enums.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/enums/structs/ ?


namespace KODE {

class KODE_EXPORT Struct
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it make more sense to flag a Class as being a struct, to avoid the duplication between Class and Struct?
In C++ all the features of a class are available in structs, including inheritance, visibility....

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it make more sense to flag a Class as being a struct, to avoid the duplication between Class and Struct?

Makes sense, let me rework the code in that way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants