Cuberite
A lightweight, fast and extensible game server for Minecraft
Public Member Functions | List of all members
cMetaRotator< Base, BitMask, North, East, South, West, AssertIfNotMatched > Class Template Reference

Mixin for rotations and reflections following the standard pattern of "apply mask, then use a switch". More...

#include <Mixins.h>

Inheritance diagram for cMetaRotator< Base, BitMask, North, East, South, West, AssertIfNotMatched >:
Inheritance graph
[legend]
Collaboration diagram for cMetaRotator< Base, BitMask, North, East, South, West, AssertIfNotMatched >:
Collaboration graph
[legend]

Public Member Functions

 cMetaRotator (BLOCKTYPE a_BlockType)
 
virtual NIBBLETYPE MetaMirrorXY (NIBBLETYPE a_Meta) override
 
virtual NIBBLETYPE MetaMirrorYZ (NIBBLETYPE a_Meta) override
 
virtual NIBBLETYPE MetaRotateCCW (NIBBLETYPE a_Meta) override
 
virtual NIBBLETYPE MetaRotateCW (NIBBLETYPE a_Meta) override
 

Detailed Description

template<class Base, NIBBLETYPE BitMask, NIBBLETYPE North, NIBBLETYPE East, NIBBLETYPE South, NIBBLETYPE West, bool AssertIfNotMatched = false>
class cMetaRotator< Base, BitMask, North, East, South, West, AssertIfNotMatched >

Mixin for rotations and reflections following the standard pattern of "apply mask, then use a switch".

Inherit from this class providing your base class as Base, the BitMask for the direction bits in bitmask and the masked value for the directions in North, East, South, West. There is also an aptional parameter AssertIfNotMatched, set this if it is invalid for a block to exist in any other state.

Definition at line 84 of file Mixins.h.

Constructor & Destructor Documentation

template<class Base, NIBBLETYPE BitMask, NIBBLETYPE North, NIBBLETYPE East, NIBBLETYPE South, NIBBLETYPE West, bool AssertIfNotMatched = false>
cMetaRotator< Base, BitMask, North, East, South, West, AssertIfNotMatched >::cMetaRotator ( BLOCKTYPE  a_BlockType)
inline

Definition at line 89 of file Mixins.h.

Member Function Documentation

template<class Base, NIBBLETYPE BitMask, NIBBLETYPE North, NIBBLETYPE East, NIBBLETYPE South, NIBBLETYPE West, bool AssertIfNotMatched = false>
virtual NIBBLETYPE cMetaRotator< Base, BitMask, North, East, South, West, AssertIfNotMatched >::MetaMirrorXY ( NIBBLETYPE  a_Meta)
inlineoverridevirtual

Reimplemented in cBlockDoorHandler.

Definition at line 139 of file Mixins.h.

template<class Base, NIBBLETYPE BitMask, NIBBLETYPE North, NIBBLETYPE East, NIBBLETYPE South, NIBBLETYPE West, bool AssertIfNotMatched = false>
virtual NIBBLETYPE cMetaRotator< Base, BitMask, North, East, South, West, AssertIfNotMatched >::MetaMirrorYZ ( NIBBLETYPE  a_Meta)
inlineoverridevirtual

Reimplemented in cBlockDoorHandler.

Definition at line 155 of file Mixins.h.

template<class Base, NIBBLETYPE BitMask, NIBBLETYPE North, NIBBLETYPE East, NIBBLETYPE South, NIBBLETYPE West, bool AssertIfNotMatched = false>
virtual NIBBLETYPE cMetaRotator< Base, BitMask, North, East, South, West, AssertIfNotMatched >::MetaRotateCCW ( NIBBLETYPE  a_Meta)
inlineoverridevirtual

Reimplemented in cBlockLeverHandler, and cBlockDoorHandler.

Definition at line 97 of file Mixins.h.

template<class Base, NIBBLETYPE BitMask, NIBBLETYPE North, NIBBLETYPE East, NIBBLETYPE South, NIBBLETYPE West, bool AssertIfNotMatched = false>
virtual NIBBLETYPE cMetaRotator< Base, BitMask, North, East, South, West, AssertIfNotMatched >::MetaRotateCW ( NIBBLETYPE  a_Meta)
inlineoverridevirtual

Reimplemented in cBlockLeverHandler, and cBlockDoorHandler.

Definition at line 118 of file Mixins.h.


The documentation for this class was generated from the following file: