Gamedev Framework (gf)  0.11.0
A C++14 framework for 2D games
Public Member Functions | Public Attributes | List of all members
gf::TmxLayer Struct Referenceabstract

A layer in the whole map. More...

#include <gf/Tmx.h>

Inheritance diagram for gf::TmxLayer:
Inheritance graph

Public Member Functions

virtual ~TmxLayer ()
 Destructor. More...
virtual void accept (const TmxLayers &map, TmxVisitor &visitor) const =0
 Accept function in the visitor pattern. More...

Public Attributes

TmxProperties properties
 The properties of the layer. More...
std::string name
 The name of the layer. More...
double opacity
 The opacity of the layer. More...
bool visible
 The visibility of the layer. More...
Vector2i offset
 The offset of the layer. More...

Detailed Description

A layer in the whole map.

The are four kinds of layers: tile layers, image layers, object layers and group layers.

See also
gf::TmxTileLayer, gf::TmxImageLayer, gf::TmxObjectLayer, gf::TmxGroupLayer

Constructor & Destructor Documentation

◆ ~TmxLayer()

virtual gf::TmxLayer::~TmxLayer ( )


Member Function Documentation

◆ accept()

virtual void gf::TmxLayer::accept ( const TmxLayers map,
TmxVisitor visitor 
) const
pure virtual

Accept function in the visitor pattern.

mapThe containing map
visitorThe visitor
See also
Wikipedia - Visitor pattern

Implemented in gf::TmxGroupLayer, gf::TmxImageLayer, gf::TmxObjectLayer, and gf::TmxTileLayer.

Member Data Documentation

◆ name

std::string gf::TmxLayer::name

The name of the layer.

◆ offset

Vector2i gf::TmxLayer::offset

The offset of the layer.

◆ opacity

double gf::TmxLayer::opacity

The opacity of the layer.

◆ properties

TmxProperties gf::TmxLayer::properties

The properties of the layer.

◆ visible

bool gf::TmxLayer::visible

The visibility of the layer.