That's my header:
#ifndef MYCLASSES_H_
#define MYCLASSES_H_
#define ARRAY_SIZE(x) (sizeof((x)) / sizeof((x)[0]))
namespace mynamespace {
class A
{
class B
{
class C
{
void doStuff(B *pB);
}
static const C SOME_ARRAY[];
static const int SOME_ARRAY_COUNT;
}
}
} //namespace mynamespace
#endif /* MYCLASSES_H_ */
And that's the CPP:
#include "myclasses.h"
namespace mynamespace {
void A::B::C::doStuff(A::B *pB)
{
/* ... */
}
const A::B::C A::B::SOME_ARRAY[] = {
/*...*/
};
const A::B::SOME_ARRAY_COUNT = ARRAY_SIZE(
} //namespace mynamespace
What shall I do to make the definitions in the .CPP file have shorter names? It's incredibly cumbersome.