Qt4Ada - An Ada2005 binding to Qt4

 

C++ features translations

As a general rule, a C++ function or method whose return value is void will give an Ada procedure, whereas a C++ function or method returning anything else will give an Ada function.

"Normal" methods

Assuming the following C++ declaration:

  1. class C
  2. {
  3. public:
  4. void m();
  5. };

The corresponding Ada procedure would be:

  1. type C is ...;
  2. procedure M(cc: in out C'Class);

Note the use of the 'Class attribute. If the method was qualified by const, the parameter passing mode of cc would have been in.

Virtual methods

Assuming the following C++ declaration:

  1. class C
  2. {
  3. public:
  4. virtual void m();
  5. };

The corresponding Ada procedure would be:

  1. type C is ...;
  2. procedure M(cc: in out C);

Here we don't use the 'Class attribute. If the method was qualified by const, the parameter passing mode of cc would have been in.

Qt specific aspects