Otclient  14/8/2020
ThingTypeManager Class Reference

#include <thingtypemanager.h>

Public Member Functions

void init ()
 
void terminate ()
 
bool loadDat (std::string file)
 
bool loadOtml (std::string file)
 
void loadOtb (const std::string &file)
 
void loadXml (const std::string &file)
 
void parseItemType (uint16 id, TiXmlElement *elem)
 
void saveDat (std::string fileName)
 
void addItemType (const ItemTypePtr &itemType)
 
const ItemTypePtrfindItemTypeByClientId (uint16 id)
 
const ItemTypePtrfindItemTypeByName (std::string name)
 
ItemTypeList findItemTypesByName (std::string name)
 
ItemTypeList findItemTypesByString (std::string name)
 
const ThingTypePtrgetNullThingType ()
 
const ItemTypePtrgetNullItemType ()
 
const ThingTypePtrgetThingType (uint16 id, ThingCategory category)
 
const ItemTypePtrgetItemType (uint16 id)
 
ThingTyperawGetThingType (uint16 id, ThingCategory category)
 
ItemTyperawGetItemType (uint16 id)
 
ThingTypeList findThingTypeByAttr (ThingAttr attr, ThingCategory category)
 
ItemTypeList findItemTypeByCategory (ItemCategory category)
 
const ThingTypeListgetThingTypes (ThingCategory category)
 
const ItemTypeListgetItemTypes ()
 
uint32 getDatSignature ()
 
uint32 getOtbMajorVersion ()
 
uint32 getOtbMinorVersion ()
 
uint16 getContentRevision ()
 
bool isDatLoaded ()
 
bool isXmlLoaded ()
 
bool isOtbLoaded ()
 
bool isValidDatId (uint16 id, ThingCategory category)
 
bool isValidOtbId (uint16 id)
 

Detailed Description

Definition at line 32 of file thingtypemanager.h.

Member Function Documentation

◆ addItemType()

void ThingTypeManager::addItemType ( const ItemTypePtr itemType)

Definition at line 332 of file thingtypemanager.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ findItemTypeByCategory()

ItemTypeList ThingTypeManager::findItemTypeByCategory ( ItemCategory  category)

Definition at line 404 of file thingtypemanager.cpp.

Here is the caller graph for this function:

◆ findItemTypeByClientId()

const ItemTypePtr & ThingTypeManager::findItemTypeByClientId ( uint16  id)

Definition at line 340 of file thingtypemanager.cpp.

Here is the caller graph for this function:

◆ findItemTypeByName()

const ItemTypePtr & ThingTypeManager::findItemTypeByName ( std::string  name)

Definition at line 351 of file thingtypemanager.cpp.

Here is the caller graph for this function:

◆ findItemTypesByName()

ItemTypeList ThingTypeManager::findItemTypesByName ( std::string  name)

Definition at line 359 of file thingtypemanager.cpp.

Here is the caller graph for this function:

◆ findItemTypesByString()

ItemTypeList ThingTypeManager::findItemTypesByString ( std::string  name)

Definition at line 368 of file thingtypemanager.cpp.

Here is the caller graph for this function:

◆ findThingTypeByAttr()

ThingTypeList ThingTypeManager::findThingTypeByAttr ( ThingAttr  attr,
ThingCategory  category 
)

Definition at line 395 of file thingtypemanager.cpp.

Here is the caller graph for this function:

◆ getContentRevision()

uint16 ThingTypeManager::getContentRevision ( )
inline

Definition at line 69 of file thingtypemanager.h.

Here is the caller graph for this function:

◆ getDatSignature()

uint32 ThingTypeManager::getDatSignature ( )
inline

Definition at line 66 of file thingtypemanager.h.

Here is the caller graph for this function:

◆ getItemType()

const ItemTypePtr & ThingTypeManager::getItemType ( uint16  id)

Definition at line 386 of file thingtypemanager.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getItemTypes()

const ItemTypeList& ThingTypeManager::getItemTypes ( )
inline

Definition at line 64 of file thingtypemanager.h.

◆ getNullItemType()

const ItemTypePtr& ThingTypeManager::getNullItemType ( )
inline

Definition at line 53 of file thingtypemanager.h.

◆ getNullThingType()

const ThingTypePtr& ThingTypeManager::getNullThingType ( )
inline

Definition at line 52 of file thingtypemanager.h.

Here is the caller graph for this function:

◆ getOtbMajorVersion()

uint32 ThingTypeManager::getOtbMajorVersion ( )
inline

Definition at line 67 of file thingtypemanager.h.

Here is the caller graph for this function:

◆ getOtbMinorVersion()

uint32 ThingTypeManager::getOtbMinorVersion ( )
inline

Definition at line 68 of file thingtypemanager.h.

Here is the caller graph for this function:

◆ getThingType()

const ThingTypePtr & ThingTypeManager::getThingType ( uint16  id,
ThingCategory  category 
)

Definition at line 377 of file thingtypemanager.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getThingTypes()

const ThingTypeList & ThingTypeManager::getThingTypes ( ThingCategory  category)

Definition at line 413 of file thingtypemanager.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init()

void ThingTypeManager::init ( )

Definition at line 40 of file thingtypemanager.cpp.

Here is the caller graph for this function:

◆ isDatLoaded()

bool ThingTypeManager::isDatLoaded ( )
inline

Definition at line 71 of file thingtypemanager.h.

Here is the caller graph for this function:

◆ isOtbLoaded()

bool ThingTypeManager::isOtbLoaded ( )
inline

Definition at line 73 of file thingtypemanager.h.

Here is the caller graph for this function:

◆ isValidDatId()

bool ThingTypeManager::isValidDatId ( uint16  id,
ThingCategory  category 
)
inline

Definition at line 75 of file thingtypemanager.h.

Here is the caller graph for this function:

◆ isValidOtbId()

bool ThingTypeManager::isValidOtbId ( uint16  id)
inline

Definition at line 76 of file thingtypemanager.h.

Here is the caller graph for this function:

◆ isXmlLoaded()

bool ThingTypeManager::isXmlLoaded ( )
inline

Definition at line 72 of file thingtypemanager.h.

◆ loadDat()

bool ThingTypeManager::loadDat ( std::string  file)

Definition at line 100 of file thingtypemanager.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadOtb()

void ThingTypeManager::loadOtb ( const std::string &  file)

Definition at line 174 of file thingtypemanager.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadOtml()

bool ThingTypeManager::loadOtml ( std::string  file)

Definition at line 139 of file thingtypemanager.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadXml()

void ThingTypeManager::loadXml ( const std::string &  file)

Definition at line 225 of file thingtypemanager.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parseItemType()

void ThingTypeManager::parseItemType ( uint16  id,
TiXmlElement elem 
)

Definition at line 276 of file thingtypemanager.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rawGetItemType()

ItemType* ThingTypeManager::rawGetItemType ( uint16  id)
inline

Definition at line 58 of file thingtypemanager.h.

◆ rawGetThingType()

ThingType* ThingTypeManager::rawGetThingType ( uint16  id,
ThingCategory  category 
)
inline

Definition at line 57 of file thingtypemanager.h.

Here is the caller graph for this function:

◆ saveDat()

void ThingTypeManager::saveDat ( std::string  fileName)

Definition at line 66 of file thingtypemanager.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ terminate()

void ThingTypeManager::terminate ( )

Definition at line 56 of file thingtypemanager.cpp.

Here is the caller graph for this function:

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