cocos2d-x
3.3
|
TMXMapInfo contains the information about the map like: More...
#include <CCTMXXMLParser.h>
Public Member Functions | |
TMXMapInfo () | |
ctor More... | |
virtual | ~TMXMapInfo () |
NA NA More... | |
bool | initWithTMXFile (const std::string &tmxFile) |
initializes a TMX format with a tmx file More... | |
bool | initWithXML (const std::string &tmxString, const std::string &resourcePath) |
initializes a TMX format with an XML string and a TMX resource path More... | |
bool | parseXMLFile (const std::string &xmlFilename) |
initializes parsing of an XML file, either a tmx (Map) file or tsx (Tileset) file More... | |
bool | parseXMLString (const std::string &xmlString) |
ValueMapIntKey & | getTileProperties () |
void | setTileProperties (const ValueMapIntKey &tileProperties) |
int | getOrientation () const |
map orientation More... | |
void | setOrientation (int orientation) |
const Size & | getMapSize () const |
map width & height More... | |
void | setMapSize (const Size &mapSize) |
const Size & | getTileSize () const |
tiles width & height More... | |
void | setTileSize (const Size &tileSize) |
const Vector< TMXLayerInfo * > & | getLayers () const |
Layers. More... | |
Vector< TMXLayerInfo * > & | getLayers () |
void | setLayers (const Vector< TMXLayerInfo * > &layers) |
const Vector< TMXTilesetInfo * > & | getTilesets () const |
tilesets More... | |
Vector< TMXTilesetInfo * > & | getTilesets () |
void | setTilesets (const Vector< TMXTilesetInfo * > &tilesets) |
const Vector< TMXObjectGroup * > & | getObjectGroups () const |
ObjectGroups. More... | |
Vector< TMXObjectGroup * > & | getObjectGroups () |
void | setObjectGroups (const Vector< TMXObjectGroup * > &groups) |
int | getParentElement () const |
parent element More... | |
void | setParentElement (int element) |
int | getParentGID () const |
parent GID More... | |
void | setParentGID (int gid) |
int | getLayerAttribs () const |
layer attribs More... | |
void | setLayerAttribs (int layerAttribs) |
bool | isStoringCharacters () const |
is storing characters? More... | |
bool | getStoringCharacters () const |
void | setStoringCharacters (bool storingCharacters) |
const ValueMap & | getProperties () const |
properties More... | |
ValueMap & | getProperties () |
void | setProperties (const ValueMap &properties) |
void | startElement (void *ctx, const char *name, const char **atts) |
NA NA More... | |
void | endElement (void *ctx, const char *name) |
NA NA More... | |
void | textHandler (void *ctx, const char *ch, int len) |
NA NA More... | |
const std::string & | getCurrentString () const |
void | setCurrentString (const std::string ¤tString) |
const std::string & | getTMXFileName () const |
void | setTMXFileName (const std::string &fileName) |
![]() | |
void | retain () |
Retains the ownership. More... | |
void | release () |
Releases the ownership immediately. More... | |
Ref * | autorelease () |
Releases the ownership sometime soon automatically. More... | |
unsigned int | getReferenceCount () const |
Returns the Ref's current reference count. More... | |
virtual | ~Ref () |
NA NA More... | |
![]() | |
virtual | ~SAXDelegator () |
Static Public Member Functions | |
static TMXMapInfo * | create (const std::string &tmxFile) |
creates a TMX Format with a tmx file More... | |
static TMXMapInfo * | createWithXML (const std::string &tmxString, const std::string &resourcePath) |
creates a TMX Format with an XML string and a TMX resource path More... | |
static TMXMapInfo * | formatWithTMXFile (const char *tmxFile) |
creates a TMX Format with a tmx file More... | |
static TMXMapInfo * | formatWithXML (const char *tmxString, const char *resourcePath) |
creates a TMX Format with an XML string and a TMX resource path More... | |
Protected Member Functions | |
void | internalInit (const std::string &tmxFileName, const std::string &resourcePath) |
![]() | |
Ref () | |
Constructor. More... | |
Protected Attributes | |
int | _orientation |
map orientation More... | |
Size | _mapSize |
map width & height More... | |
Size | _tileSize |
tiles width & height More... | |
Vector< TMXLayerInfo * > | _layers |
Layers. More... | |
Vector< TMXTilesetInfo * > | _tilesets |
tilesets More... | |
Vector< TMXObjectGroup * > | _objectGroups |
ObjectGroups. More... | |
int | _parentElement |
parent element More... | |
int | _parentGID |
parent GID More... | |
int | _layerAttribs |
layer attribs More... | |
bool | _storingCharacters |
is storing characters? More... | |
ValueMap | _properties |
properties More... | |
int | _xmlTileIndex |
xml format tile index More... | |
std::string | _TMXFileName |
tmx filename More... | |
std::string | _resources |
std::string | _currentString |
current string More... | |
ValueMapIntKey | _tileProperties |
tile properties More... | |
int | _currentFirstGID |
bool | _recordFirstGID |
![]() | |
unsigned int | _referenceCount |
count of references More... | |
TMXMapInfo contains the information about the map like:
And it also contains:
This information is obtained from the TMX file.
TMXMapInfo | ( | ) |
ctor
|
virtual |
NA NA
|
static |
creates a TMX Format with a tmx file
|
static |
creates a TMX Format with an XML string and a TMX resource path
|
virtual |
NA NA
Implements SAXDelegator.
|
inlinestatic |
creates a TMX Format with a tmx file
|
inlinestatic |
creates a TMX Format with an XML string and a TMX resource path
|
inline |
|
inline |
layer attribs
|
inline |
Layers.
|
inline |
|
inline |
map width & height
|
inline |
ObjectGroups.
|
inline |
|
inline |
map orientation
|
inline |
parent element
|
inline |
parent GID
|
inline |
properties
|
inline |
|
inline |
|
inline |
|
inline |
tilesets
|
inline |
|
inline |
tiles width & height
|
inline |
bool initWithTMXFile | ( | const std::string & | tmxFile | ) |
initializes a TMX format with a tmx file
bool initWithXML | ( | const std::string & | tmxString, |
const std::string & | resourcePath | ||
) |
initializes a TMX format with an XML string and a TMX resource path
|
protected |
|
inline |
is storing characters?
bool parseXMLFile | ( | const std::string & | xmlFilename | ) |
initializes parsing of an XML file, either a tmx (Map) file or tsx (Tileset) file
bool parseXMLString | ( | const std::string & | xmlString | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
virtual |
NA NA
Implements SAXDelegator.
|
virtual |
NA NA
Implements SAXDelegator.
|
protected |
|
protected |
current string
|
protected |
layer attribs
|
protected |
Layers.
|
protected |
map width & height
|
protected |
ObjectGroups.
|
protected |
map orientation
|
protected |
parent element
|
protected |
parent GID
|
protected |
properties
|
protected |
|
protected |
|
protected |
is storing characters?
|
protected |
tile properties
|
protected |
tilesets
|
protected |
tiles width & height
|
protected |
tmx filename
|
protected |
xml format tile index