My (long-ago unanswered) question about exposing constants with 
Inline::C is basically the same thing as this.

I'm working on a binding to the Dime dxf library.  The code is on my 
subversion server:
  http://ericwilhelm.homeip.net/svn/CAD-Drawing/trunk/code/CAD/DXF/

In a file from the dime distribution (include/dime/Base.h), there is 
an enum like so:

class DIME_DLL_API dimeBase
{
public:
  enum {
    dimeBaseType = 1,
    dimeRecordType,
    dimeStringRecordType,
    dimeFloatRecordType,

The question is:  how do I get at these values from perl?  I would 
like to have something like $CAD::DXF::Dime::dimeBaseType.

Right now, all I can see is to either parse the .h file from Perl or 
copy the values out of it.  Generating some C++ code from Perl in the 
BEGIN block also looks like an option.  I was just hoping that there 
would be some kind of DWIM solution.

Any suggestions?

--Eric
-- 
A counterintuitive sansevieria trifasciata was once literalized 
guiltily.
                                 --Product of Artificial Intelligence

Reply via email to