BShape: use BShape::Private class to access private methods.
Avoid declaring random friend classes in public header. Allow to access private methods from arbitrary source if needed. Change-Id: Iac2cf0ca59e483aa0657e3fe1fc47080c661cf8b Reviewed-on: https://review.haiku-os.org/c/haiku/+/8534 Reviewed-by: waddlesplash <[email protected]> Tested-by: Commit checker robot <[email protected]>
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#ifndef SHAPE_PRIVATE_H
|
||||
#define SHAPE_PRIVATE_H
|
||||
|
||||
#include <Shape.h>
|
||||
#include <Point.h>
|
||||
#include <Rect.h>
|
||||
#include <Referenceable.h>
|
||||
@@ -97,4 +98,20 @@ public:
|
||||
};
|
||||
|
||||
|
||||
class BShape::Private {
|
||||
public:
|
||||
Private(BShape& shape) : fShape(shape) {}
|
||||
|
||||
void GetData(int32* opCount, int32* ptCount,
|
||||
uint32** opList, BPoint** ptList);
|
||||
void SetData(int32 opCount, int32 ptCount,
|
||||
const uint32* opList,
|
||||
const BPoint* ptList);
|
||||
shape_data* PrivateData() {return (shape_data*)fShape.fPrivateData;}
|
||||
|
||||
private:
|
||||
BShape& fShape;
|
||||
};
|
||||
|
||||
|
||||
#endif // SHAPE_PRIVATE_H
|
||||
|
||||
Reference in New Issue
Block a user