|
Eile Mit Weile
|
Represents a normal space on the board. More...
#include <NormalSpace.hpp>
Public Member Functions | |
| NormalSpace (unsigned space_idx) | |
| unsigned | GetTypeOfSpace () const override |
| void | WriteIntoJson (rapidjson::Value &json, rapidjson::Document::AllocatorType &allocator) const override |
Public Member Functions inherited from Space | |
| Space (unsigned space_idx, std::vector< Figure * > figures=std::vector< Figure * >(0)) | |
| ~Space () | |
| virtual unsigned | AddFigure (Figure *figure) |
| virtual Figure * | RemoveFigure (Figure *figure) |
| virtual std::vector< Figure * > | GetFigures () |
| unsigned | GetSpaceIdx () const |
| virtual bool | IsBlocked () const |
| void | WriteIntoJson (rapidjson::Value &json, rapidjson::Document::AllocatorType &allocator) const override |
Public Member Functions inherited from UniqueSerializable | |
| std::string | GetId () const |
| void | WriteIntoJson (rapidjson::Value &json, rapidjson::MemoryPoolAllocator< rapidjson::CrtAllocator > &allocator) const override |
Public Member Functions inherited from Serializable | |
| virtual rapidjson::Document * | ToJson () const |
Static Public Member Functions | |
| static NormalSpace * | FromJson (const rapidjson::Value &json) |
Private Member Functions | |
| NormalSpace (std::string id, unsigned space_idx, std::vector< Figure * > figures) | |
Additional Inherited Members | |
Protected Member Functions inherited from Space | |
| Space (std::string id, unsigned space_idx, std::vector< Figure * > figures) | |
Protected Member Functions inherited from UniqueSerializable | |
| UniqueSerializable () | |
| UniqueSerializable (std::string id) | |
Protected Attributes inherited from Space | |
| std::vector< Figure * > | _figures |
| unsigned | _space_idx |
Protected Attributes inherited from UniqueSerializable | |
| std::string | id |
Represents a normal space on the board.
Normal spaces are the most common spaces on the board. They have no special functionality.
|
explicit |
Constructor: creates a NormalSpace with a space index
|
private |
Deserialization constructor used by FromJson
|
static |
Deserializes a NormalSpace object from a json object. Used by client.
Returns the type of the space. For normal spaces this is 0. Currently never used as normal spaces have no special functionality.
Reimplemented from Space.
|
overridevirtual |
Serializes a NormalSpace object into a json object. Used by server.
Implements Serializable.