cxx
cxx copied to clipboard
Are inner items supported?
Consider the following C++ code (taken from libwebm)
class BlockEntry {
BlockEntry(const BlockEntry&);
BlockEntry& operator=(const BlockEntry&);
protected:
BlockEntry(Cluster*, long index);
public:
virtual ~BlockEntry();
// ...
enum Kind { kBlockEOS, kBlockSimple, kBlockGroup };
virtual Kind GetKind() const = 0;
// ...
};
It's not clear to me how you're supposed to create a cxx::bridge for the type BlockEntry::Kind. Trying to treat the class as a namespace doesn't work, and the documentation doesn't show any demonstration of how this should be handled.
On a similar note, how should one go about binding a static function from a class? i.e.
struct Colour {
// ...
static bool Parse(IMkvReader* reader, long long element_start,
long long element_size, Colour** colour);
// ...
}
At least for the static function I just created outside functions to call the inner static methods on the cpp side. Not ideal, but works.