/********************************************************************
*
* File: fsILayer.h
*
* Purpose: Interface to a tile map layer which can be normal
* tiles or object groups
*
*********************************************************************/
#ifndef fsILayerhdr
#define fsILayerhdr
#include <vector>
#include <fsCore/fsBaseTypes.h>
#include <fsCore/fsStr.h>
#include <fsCore/fsPoint.h>
#include "fsTileMapForward.h"
namespace fsNTileMap
{
class fsILayer
{
public:
enum class eType
{
UNKNOWN,
TILE,
OBJECT,
IMAGE
};
eType typeGet() const;
virtual std::vector<fsIObjectRef> objectsGet() const = 0;
virtual fsIObjectRef objectGet(const fsStr& pName) const = 0;
virtual fsITileRef tileGet(fsS32 pX, fsS32 pY) const = 0;
/// Path (relative to the map) of an IMAGE layer's backdrop/parallax image.
virtual fsStr imagePathGet() const = 0;
/// Authored layer offset in map pixels (Tiled offsetx/offsety, or x/y).
virtual fsPoint layerOffsetGet() const = 0;
virtual fsStr nameGet() const = 0;
virtual ~fsILayer() = default;
protected:
fsILayer() = default;<--- Member variable 'fsILayer::mType' is not initialized in the constructor. [+]Member variable 'fsILayer::mType' is not initialized in the constructor. Member variables of native types, pointers, or references are left uninitialized when the class is instantiated. That may cause bugs or undefined behavior.
eType mType;
private:
};
}
#endif