// this defines RTransformable, TransformableArray and RTransformableArray
ACDK_DECL_INTERFACE(Transformable);
enum Axis
{
Horizontal,
Vertical
};
ACDK_DEF_ENUM(Axis);
// the interface
class Transformable
ACDK_INTERFACEBASE // needed for dispatching
{
ACDK_WITH_METAINFO(Transformable) // optional, for class information see Metainfo
public:
virtual void rotate(int degree) = 0;
virtual void mirror(Axis axis) = 0;
};
ACDK_DECL_CLASS(Shape);
class Shape
: extends acdk::lang::Object
, implements Transformable
{
ACDK_WITH_METAINFO(Shape) // optional, for class information see Metainfo
public:
virtual void rotate(int degree)
{
// implement the functionality
}
virtual void mirror(Axis axis)
{
// implement the functionality
}
};
|