I am trying to map a series of enums which are declared and then used as follows:
namespace Lib {
struct SomeEnumName {
enum Enum {
EUndefined,
...
}
}
...
class SomeClass {
public:
SomeType* DoSomething(SomeEnumName::Enum value, ...) {
...
}
}
}
I am trying to map them like this:
<map enum="SomeEnumName::Enum" />
But I get these errors:
C:\Project\Mapping.xml(1,1): warning SG0019: Mapping rule [map enum:SomeEnumName::Enum] did not match any elements.
CppInterface [SomeClass]/Method SomeType* SomeClass::DoSomething([In] Enum type,[In] void* data) error : Unknown type found [Enum]
Are these enums represented in the C++ AST at all? How do I match on them such that first of all the method will be generated and second that some C# equivalent of the enumerations is created?
Next to that, the wrapping is usually in otherwise empty structs, probably because C++ enums are a broken concept as their constant members aren't scoped to the enum declaration. But it is silly to have enums be declared as nested in a struct, although it is valid C#. How do I match on them and change the C# such that these enums will be declared as SomeEnumName?
I am trying to map a series of enums which are declared and then used as follows:
I am trying to map them like this:
But I get these errors:
Are these enums represented in the C++ AST at all? How do I match on them such that first of all the method will be generated and second that some C# equivalent of the enumerations is created?
Next to that, the wrapping is usually in otherwise empty structs, probably because C++ enums are a broken concept as their constant members aren't scoped to the enum declaration. But it is silly to have enums be declared as nested in a struct, although it is valid C#. How do I match on them and change the C# such that these enums will be declared as
SomeEnumName?