[cable] using cable problem

Valery Sigalov valery.sigalov at audiocodes.com
Tue May 7 12:05:33 EDT 2002


I tried to create a wrapper, using cable to very simple C++ class, which I found on the cable site.
Below the configuration file config.cxx, I used:

class Integer
{
public:
    Integer(): m_Int(0) {}
    Integer(const Integer& r): m_Int(r.m_Int)  {}
    Integer(int i): m_Int(i) {}
    ~Integer() {}
    int Get() const { return m_Int; }
    void Set(int i) { m_Int = i; }
    const Integer* GetPointer() const { return this; }
    Integer& operator+=(const Integer& r)
      { m_Int += r.m_Int; return *this; }
    static float Mean(const Integer& l, const Integer& r)
      { return (float(l.m_Int)+float(r.m_Int))/2.0; }
private:
    int m_Int;
};
  

#ifdef CABLE_CONFIGURATION
namespace _cable_
{
    const char* const group="IntegerTcl1";
    const char* const package="IntegerTcl";
    const char* const groups[]={"IntegerTcl1"};
    namespace wrappers
    {
      typedef Integer myWrapperClass;
    }
}
  
void cable_instantiate()
{
    using namespace _cable_::wrappers;
    sizeof(myWrapperClass);
}
#endif

To run this example I wrote:   cable.exe config.cxx -tcl 1.cxx .

I received output file with a wrapper without any problem, but I did not find in this file the member
variable  m_Int . All I saw were a wrappers to a member functions. How can I have an access  
to the member variables?
                                                            Regards, Valery.


************************************************************************************************************
This email and any files transmitted with it are confidential material.
They are intended solely for the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify postmaster at audiocodes.com
and permanently delete the e-mail and files.
***********************************************************************************************************

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cable/attachments/20020507/43f41e88/attachment.html>


More information about the cable mailing list