cocos2d-x  2.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CCTMXMapInfo Class Reference

CCTMXMapInfo contains the information about the map like: More...

#include <CCTMXXMLParser.h>

Inheritance diagram for CCTMXMapInfo:
CCObject CCSAXDelegator CCCopying

Public Member Functions

virtual const CCSizegetMapSize (void)
 getMapSize More...
 
local getMapSize ()
 getMapSize More...
 
virtual void setMapSize (const CCSize &var)
 set# MapSize More...
 
virtual const CCSizegetTileSize (void)
 getTileSize More...
 
virtual void setTileSize (const CCSize &var)
 set# TileSize More...
 
local setTileSize ( local var)
 set# TileSize More...
 
virtual CCArraygetLayers (void)
 getLayers More...
 
local getLayers ()
 getLayers More...
 
virtual void setLayers (CCArray *var)
 setLayers More...
 
virtual CCArraygetTilesets (void)
 getTilesets More...
 
var getTilesets ()
 getTilesets More...
 
virtual void setTilesets (CCArray *var)
 setTilesets More...
 
virtual CCArraygetObjectGroups (void)
 getObjectGroups More...
 
local getObjectGroups ()
 getObjectGroups More...
 
virtual void setObjectGroups (CCArray *var)
 setObjectGroups More...
 
virtual CCDictionarygetProperties (void)
 getProperties More...
 
var getProperties ()
 getProperties More...
 
local getProperties ()
 getProperties More...
 
virtual void setProperties (CCDictionary *var)
 setProperties More...
 
 CCTMXMapInfo ()
virtual ~CCTMXMapInfo ()
bool initWithTMXFile (const char *tmxFile)
 initializes a TMX format with a tmx file More...
 
bool initWithXML (const char *tmxString, const char *resourcePath)
 initializes a TMX format with an XML string and a TMX resource path More...
 
bool parseXMLFile (const char *xmlFilename)
 initializes parsing of an XML file, either a tmx (Map) file or tsx (Tileset) file More...
 
bool parseXMLString (const char *xmlString)
CCDictionarygetTileProperties ()
void setTileProperties (CCDictionary *tileProperties)
void startElement (void *ctx, const char *name, const char **atts)
 implement pure virtual methods of CCSAXDelegator More...
 
void endElement (void *ctx, const char *name)
void textHandler (void *ctx, const char *ch, int len)
const char * getCurrentString ()
var getCurrentString ()
local getCurrentString ()
void setCurrentString (const char *currentString)
const char * getTMXFileName ()
void setTMXFileName (const char *fileName)
- Public Member Functions inherited from CCObject
 CCObject (void)
virtual ~CCObject (void)
void release (void)
void retain (void)
CCObjectautorelease (void)
CCObjectcopy (void)
bool isSingleReference (void) const
unsigned int retainCount (void) const
virtual bool isEqual (const CCObject *pObject)
virtual void acceptVisitor (CCDataVisitor &visitor)
virtual void update (float dt)
- Public Member Functions inherited from CCCopying
virtual CCObjectcopyWithZone (CCZone *pZone)

Static Public Member Functions

static CCTMXMapInfoformatWithTMXFile (const char *tmxFile)
 creates a TMX Format with a tmx file More...
 
var formatWithTMXFile ( var tmxFile)
 creates a TMX Format with a tmx file More...
 
local formatWithTMXFile ( local tmxFile)
 creates a TMX Format with a tmx file More...
 
static CCTMXMapInfoformatWithXML (const char *tmxString, const char *resourcePath)
 creates a TMX Format with an XML string and a TMX resource path More...
 
var formatWithXML ( var tmxString, var resourcePath)
 creates a TMX Format with an XML string and a TMX resource path More...
 
local formatWithXML ( local tmxString, local resourcePath)
 creates a TMX Format with an XML string and a TMX resource path More...
 

Public Attributes

virtual int getOrientation (void)\n\n public
 getOrientation More...
 
local getOrientation ()
 getOrientation More...
 
virtual int getParentElement (void)\n\n public
 getParentElement More...
 
local getParentElement ()
 getParentElement More...
 
virtual unsigned int getParentGID (void)\n\n public
 getParentGID More...
 
var getParentGID ()
 getParentGID More...
 
local getParentGID ()
 getParentGID More...
 
virtual int getLayerAttribs (void)\n\n public
 getLayerAttribs More...
 
local getLayerAttribs ()
 getLayerAttribs More...
 
virtual bool getStoringCharacters (void)\n\n public
 getStoringCharacters More...
 
var getStoringCharacters ()
 getStoringCharacters More...
 
local getStoringCharacters ()
 getStoringCharacters More...
 
- Public Attributes inherited from CCObject
unsigned int m_uID
int m_nLuaID

Protected Attributes

int m_nOrientation
 map orientation More...
 
CCSize m_tMapSize
 map width & height More...
 
var m_tMapSize
 map width & height More...
 
local m_tMapSize
 map width & height More...
 
CCSize m_tTileSize
 tiles width & height More...
 
CCArraym_pLayers
 Layers. More...
 
CCArraym_pTilesets
 tilesets More...
 
CCArraym_pObjectGroups
 ObjectGroups. More...
 
int m_nParentElement
 parent element More...
 
unsigned int m_uParentGID
 parent GID More...
 
int m_nLayerAttribs
 layer attribs More...
 
bool m_bStoringCharacters
 is storing characters? More...
 
CCDictionarym_pProperties
 properties More...
 
std::string m_sTMXFileName
 tmx filename More...
 
std::string m_sResources
std::string m_sCurrentString
 current string More...
 
var m_sCurrentString
 current string More...
 
local m_sCurrentString
 current string More...
 
CCDictionarym_pTileProperties
 tile properties More...
 
var m_pTileProperties
 tile properties More...
 
local m_pTileProperties
 tile properties More...
 
unsigned int m_uCurrentFirstGID
- Protected Attributes inherited from CCObject
unsigned int m_uReference
unsigned int m_uAutoReleaseCount

Detailed Description

CCTMXMapInfo contains the information about the map like:

  • Map orientation (hexagonal, isometric or orthogonal)
  • Tile size
  • Map size

And it also contains:

  • Layers (an array of TMXLayerInfo objects)
  • Tilesets (an array of TMXTilesetInfo objects)
  • ObjectGroups (an array of TMXObjectGroupInfo objects)

This information is obtained from the TMX file.

Constructor & Destructor Documentation

var ctor ( )
virtual ~CCTMXMapInfo ( )
virtual

Member Function Documentation

void endElement ( void *  ctx,
const char *  name 
)
virtual

Implements CCSAXDelegator.

local endElement ( local  ctx,
local  name 
)
virtual

Implements CCSAXDelegator.

static CCTMXMapInfo*
formatWithTMXFile
( const char *  tmxFile)
static

creates a TMX Format with a tmx file

var formatWithTMXFile ( var  tmxFile)
static

creates a TMX Format with a tmx file

local formatWithTMXFile ( local  tmxFile)
static

creates a TMX Format with a tmx file

static CCTMXMapInfo* formatWithXML ( const char *  tmxString,
const char *  resourcePath 
)
static

creates a TMX Format with an XML string and a TMX resource path

var formatWithXML ( var  tmxString,
var  resourcePath 
)
static

creates a TMX Format with an XML string and a TMX resource path

local formatWithXML ( local  tmxString,
local  resourcePath 
)
static

creates a TMX Format with an XML string and a TMX resource path

const char* getCurrentString ( )
inline
var getCurrentString ( )
inline
local getCurrentString ( )
inline
virtual CCArray* getLayers ( void  )
virtual

getLayers

var getLayers (   )
virtual

getLayers

local getLayers (   )
virtual

getLayers

virtual const CCSize& getMapSize ( void  )
virtual

getMapSize

var getMapSize (   )
virtual

getMapSize

local getMapSize (   )
virtual

getMapSize

virtual CCArray* getObjectGroups ( void  )
virtual

getObjectGroups

var getObjectGroups (   )
virtual

getObjectGroups

local getObjectGroups (   )
virtual

getObjectGroups

virtual CCDictionary* getProperties ( void  )
virtual

getProperties

var getProperties (   )
virtual

getProperties

local getProperties (   )
virtual

getProperties

CCDictionary* getTileProperties ( )
var getTileProperties ( )
local getTileProperties ( )
virtual CCArray* getTilesets ( void  )
virtual

getTilesets

var getTilesets (   )
virtual

getTilesets

local getTilesets (   )
virtual

getTilesets

virtual const CCSize& getTileSize ( void  )
virtual

getTileSize

var getTileSize (   )
virtual

getTileSize

local getTileSize (   )
virtual

getTileSize

const char* getTMXFileName ( )
inline
var getTMXFileName ( )
inline
local getTMXFileName ( )
inline
bool initWithTMXFile ( const char *  tmxFile)

initializes a TMX format with a tmx file

var initWithTMXFile ( var  tmxFile)

initializes a TMX format with a tmx file

bool initWithXML ( const char *  tmxString,
const char *  resourcePath 
)

initializes a TMX format with an XML string and a TMX resource path

var initWithXML ( var  tmxString,
var  resourcePath 
)

initializes a TMX format with an XML string and a TMX resource path

bool parseXMLFile ( const char *  xmlFilename)

initializes parsing of an XML file, either a tmx (Map) file or tsx (Tileset) file

var parseXMLFile ( var  xmlFilename)

initializes parsing of an XML file, either a tmx (Map) file or tsx (Tileset) file

local parseXMLFile ( local  xmlFilename)

initializes parsing of an XML file, either a tmx (Map) file or tsx (Tileset) file

bool parseXMLString ( const char *  xmlString)
var parseXMLString ( var  xmlString)
local parseXMLString ( local  xmlString)
void setCurrentString ( const char *  currentString)
inline
var setCurrentString ( var  currentString)
inline
local setCurrentString ( local  currentString)
inline
virtual void setLayers ( CCArray var)
virtual

setLayers

var setLayers ( var  var)
virtual

setLayers

local setLayers ( local  var)
virtual

setLayers

virtual void setMapSize ( const CCSize var)
virtual

set# MapSize

var setMapSize ( var  var)
virtual

set# MapSize

local setMapSize ( local  var)
virtual

set# MapSize

virtual void setObjectGroups ( CCArray var)
virtual

setObjectGroups

var setObjectGroups ( var  var)
virtual

setObjectGroups

local setObjectGroups ( local  var)
virtual

setObjectGroups

virtual void setProperties ( CCDictionary var)
virtual

setProperties

var setProperties ( var  var)
virtual

setProperties

local setProperties ( local  var)
virtual

setProperties

void setTileProperties ( CCDictionary tileProperties)
var setTileProperties ( var  tileProperties)
local setTileProperties ( local  tileProperties)
virtual void setTilesets ( CCArray var)
virtual

setTilesets

var setTilesets ( var  var)
virtual

setTilesets

local setTilesets ( local  var)
virtual

setTilesets

virtual void setTileSize ( const CCSize var)
virtual

set# TileSize

var setTileSize ( var  var)
virtual

set# TileSize

local setTileSize ( local  var)
virtual

set# TileSize

void setTMXFileName ( const char *  fileName)
inline
var setTMXFileName ( var  fileName)
inline
local setTMXFileName ( local  fileName)
inline
void startElement ( void *  ctx,
const char *  name,
const char **  atts 
)
virtual

implement pure virtual methods of CCSAXDelegator

Implements CCSAXDelegator.

local startElement ( local  ctx,
local  name,
local  atts 
)
virtual

implement pure virtual methods of CCSAXDelegator

Implements CCSAXDelegator.

void textHandler ( void *  ctx,
const char *  ch,
int  len 
)
virtual

Implements CCSAXDelegator.

local textHandler ( local  ctx,
local  ch,
local  len 
)
virtual

Implements CCSAXDelegator.

Member Data Documentation

virtual int getLayerAttribs(void)\n\n
public

getLayerAttribs

setLayerAttribs

var public

getLayerAttribs

setLayerAttribs

local public

getLayerAttribs

setLayerAttribs

virtual int getOrientation(void)\n\n
public

getOrientation

setOrientation

var public

getOrientation

setOrientation

local public

getOrientation

setOrientation

virtual int getParentElement(void)\n\n
public

getParentElement

setParentElement

var public

getParentElement

setParentElement

local public

getParentElement

setParentElement

virtual unsigned int
getParentGID(void)\n\n public

getParentGID

setParentGID

var public

getParentGID

setParentGID

local public

getParentGID

setParentGID

virtual bool
getStoringCharacters(void)\n\n
public

getStoringCharacters

setStoringCharacters

var public

getStoringCharacters

setStoringCharacters

local public

getStoringCharacters

setStoringCharacters

bool m_bStoringCharacters
protected

is storing characters?

var m_bStoringCharacters
protected

is storing characters?

local m_bStoringCharacters
protected

is storing characters?

int m_nLayerAttribs
protected

layer attribs

var m_nLayerAttribs
protected

layer attribs

local m_nLayerAttribs
protected

layer attribs

int m_nOrientation
protected

map orientation

var m_nOrientation
protected

map orientation

local m_nOrientation
protected

map orientation

int m_nParentElement
protected

parent element

var m_nParentElement
protected

parent element

local m_nParentElement
protected

parent element

CCArray* m_pLayers
protected

Layers.

var m_pLayers
protected

Layers.

local m_pLayers
protected

Layers.

CCArray* m_pObjectGroups
protected

ObjectGroups.

var m_pObjectGroups
protected

ObjectGroups.

local m_pObjectGroups
protected

ObjectGroups.

CCDictionary* m_pProperties
protected

properties

var m_pProperties
protected

properties

local m_pProperties
protected

properties

CCDictionary* m_pTileProperties
protected

tile properties

var m_pTileProperties
protected

tile properties

local m_pTileProperties
protected

tile properties

CCArray* m_pTilesets
protected

tilesets

var m_pTilesets
protected

tilesets

local m_pTilesets
protected

tilesets

std::string m_sCurrentString
protected

current string

var m_sCurrentString
protected

current string

local m_sCurrentString
protected

current string

std::string m_sResources
protected
var m_sResources
protected
local m_sResources
protected
std::string m_sTMXFileName
protected

tmx filename

var m_sTMXFileName
protected

tmx filename

local m_sTMXFileName
protected

tmx filename

CCSize m_tMapSize
protected

map width & height

var m_tMapSize
protected

map width & height

local m_tMapSize
protected

map width & height

CCSize m_tTileSize
protected

tiles width & height

var m_tTileSize
protected

tiles width & height

local m_tTileSize
protected

tiles width & height

unsigned int m_uCurrentFirstGID
protected
var m_uCurrentFirstGID
protected
local m_uCurrentFirstGID
protected
unsigned int m_uParentGID
protected

parent GID

var m_uParentGID
protected

parent GID

local m_uParentGID
protected

parent GID


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