|
EvEmu
0.8.4
11 September 2021
|
#include "NPCMarket.h"


Classes | |
| struct | stationOrder |
Public Member Functions | |
| NPCMarket () | |
Public Member Functions inherited from XMLParserEx | |
| template<typename T > | |
| void | AddMemberParser (const char *name, T &instance, bool(T::*method)(const TiXmlElement *)) |
| Adds a member parser. More... | |
| template<typename T > | |
| void | AddValueParser (const char *name, T &value) |
| Adds a value parser. More... | |
Public Member Functions inherited from XMLParser | |
| XMLParser () | |
| Primary constructor. More... | |
| virtual | ~XMLParser () |
| A destructor. More... | |
| bool | ParseFile (const char *file) |
| Parses file using registered parsers. More... | |
| bool | ParseElement (const TiXmlElement *element) const |
| Parses element using registered parsers. More... | |
| bool | ParseElementChildren (const TiXmlElement *element, size_t max=0) const |
| Parses element's children using registered parsers. More... | |
| void | AddParser (const char *name, ElementParser *parser) |
| Adds a parser. More... | |
| void | RemoveParser (const char *name) |
| Removes a parser. More... | |
| void | ClearParsers () |
| Clears all parsers. More... | |
Static Public Member Functions | |
| static void | CreateNPCMarketFromFile (std::string filename) |
Private Member Functions | |
| bool | ProcessNPCOrders (const TiXmlElement *ele) |
| bool | ProcessStation (const TiXmlElement *ele) |
| bool | ProcessOrder (const TiXmlElement *ele) |
Private Attributes | |
| MarketDB | m_db |
| uint32 | StationID |
| struct NPCMarket::stationOrder | order |
| std::list< stationOrder > | newOrders |
Additional Inherited Members | |
Public Attributes inherited from XMLParser | |
| std::unique_ptr< TiXmlDocument > | m_pXML_Document |
Protected Member Functions inherited from XMLParserEx | |
| template<typename T > | |
| void | AddMemberParser (const char *name, bool(T::*method)(const TiXmlElement *)) |
| Adds a member parser, assuming that instance is this. More... | |
Definition at line 41 of file NPCMarket.h.
| NPCMarket::NPCMarket | ( | ) |
Definition at line 11 of file NPCMarket.cpp.
References XMLParserEx::AddMemberParser(), and ProcessNPCOrders().

|
static |
Process an xml file to create NPC market orders.
| filename | the file to process, path relative to the server root directory. |
Definition at line 16 of file NPCMarket.cpp.
References _log, DBerror::c_str(), XMLParser::ParseFile(), sDatabase, and sLog.

|
private |
Process the NPC Orders from the xml document.
| ele | the xml element to process. |
Definition at line 43 of file NPCMarket.cpp.
References XMLParserEx::AddMemberParser(), XMLParserEx::AddValueParser(), NPCMarket::stationOrder::Bid, order, XMLParser::ParseElementChildren(), NPCMarket::stationOrder::Price, ProcessOrder(), ProcessStation(), NPCMarket::stationOrder::Qty, XMLParser::RemoveParser(), StationID, and NPCMarket::stationOrder::TypeID.
Referenced by NPCMarket().


|
private |
Process the order entries from the xml document.
| ele | the xml element to process. |
Definition at line 146 of file NPCMarket.cpp.
References NPCMarket::stationOrder::Bid, newOrders, order, XMLParser::ParseElementChildren(), NPCMarket::stationOrder::Price, NPCMarket::stationOrder::Qty, and NPCMarket::stationOrder::TypeID.
Referenced by ProcessNPCOrders().


|
private |
Process the station entries from the xml document.
| ele | the xml element to process. |
Definition at line 65 of file NPCMarket.cpp.
References _log, DBerror::c_str(), codelog, GetFileTimeNow(), newOrders, XMLParser::ParseElementChildren(), StationData::regionID, sDatabase, sLog, StationID, stDataMgr, and StationData::systemID.
Referenced by ProcessNPCOrders().


|
private |
Access to the market database information.
Definition at line 57 of file NPCMarket.h.
|
private |
A list of orders retrieved for the current station.
Definition at line 87 of file NPCMarket.h.
Referenced by ProcessOrder(), and ProcessStation().
|
private |
Referenced by ProcessNPCOrders(), and ProcessOrder().
|
private |
Container for the retrieved station ID.
Definition at line 61 of file NPCMarket.h.
Referenced by ProcessNPCOrders(), and ProcessStation().