PIDUINO
Loading...
Searching...
No Matches
Global definitions

Detailed Description

Collaboration diagram for Global definitions:

Namespaces

namespace  Piduino
 Global namespace for Piduino.
 

Macros

#define PIMP_D(Class)
 PIMP_D.
 
#define PIMP_Q(Class)
 PIMP_Q.
 
#define PIMP_DECLARE_PRIVATE(Class)
 PIMP_DECLARE_PRIVATE.
 
#define PIMP_DECLARE_PUBLIC(Class)
 PIMP_DECLARE_PUBLIC.
 

Macro Definition Documentation

◆ PIMP_D

#define PIMP_D (   Class)

PIMP_D.

Provides a d pointer to the private class, use d_func() to access it which is defined in PIMP_DECLARE_PRIVATE. If you want to access the private class from a const method, use const_cast as in the following example:

void MyClass::foo() const
{
PIMP_D(const MyClass);
d->bar();
}
#define PIMP_D(Class)
PIMP_D.
Definition global.h:49
Parameters
Classthe API class name

Definition at line 49 of file global.h.

◆ PIMP_DECLARE_PRIVATE

#define PIMP_DECLARE_PRIVATE (   Class)

PIMP_DECLARE_PRIVATE.

Provides d_func() to access the private class, must be added in the private section of the API class, as in the following example:

class MyClass : public PimplClass {
public:
void foo();
};
#define PIMP_DECLARE_PRIVATE(Class)
PIMP_DECLARE_PRIVATE.
Definition global.h:82
Parameters
Classthe API class name

Definition at line 82 of file global.h.

◆ PIMP_DECLARE_PUBLIC

#define PIMP_DECLARE_PUBLIC (   Class)

PIMP_DECLARE_PUBLIC.

Provides q_func() to access the API class, must be added in the public section of the private class, as in the following example:

class MyClass::Private : public PimplClass::Private {
public:
void foo();
};
#define PIMP_DECLARE_PUBLIC(Class)
PIMP_DECLARE_PUBLIC.
Definition global.h:98
Parameters
Classthe API class name

Definition at line 98 of file global.h.

◆ PIMP_Q

#define PIMP_Q (   Class)

PIMP_Q.

Provides a q pointer to the API class, use q_func() to access it which is defined in PIMP_DECLARE_PUBLIC. If you want to access the API class from a const method, use const_cast as in the following example:

void MyClass::Private::foo() const
{
PIMP_Q(const MyClass);
q->bar();
}
#define PIMP_Q(Class)
PIMP_Q.
Definition global.h:66
Parameters
Classthe API class name

Definition at line 66 of file global.h.