TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
ChatLink.cpp File Reference
#include "ChatLink.h"
#include "SpellMgr.h"
#include "ObjectMgr.h"
#include "SpellInfo.h"
#include "DBCStores.h"
#include "AchievementMgr.h"
+ Include dependency graph for ChatLink.cpp:

Macros

#define DELIMITER   ':'
 
#define PIPE_CHAR   '|'
 

Functions

bool ReadUInt32 (std::istringstream &iss, uint32 &res)
 
bool ReadInt32 (std::istringstream &iss, int32 &res)
 
std::string ReadSkip (std::istringstream &iss, char term)
 
bool CheckDelimiter (std::istringstream &iss, char delimiter, const char *context)
 
bool ReadHex (std::istringstream &iss, uint32 &res, uint32 length)
 

Macro Definition Documentation

#define DELIMITER   ':'
#define PIPE_CHAR   '|'

Function Documentation

bool CheckDelimiter ( std::istringstream &  iss,
char  delimiter,
const char *  context 
)
inline
75 {
76  char c = iss.peek();
77  if (c != delimiter)
78  {
79  TC_LOG_TRACE("chat.system", "ChatHandler::isValidChatMessage('%s'): invalid %s link structure ('%c' expected, '%c' found)", iss.str().c_str(), context, delimiter, c);
80  return false;
81  }
82  iss.ignore(1);
83  return true;
84 }
#define TC_LOG_TRACE(filterType__,...)
Definition: Log.h:195

+ Here is the caller graph for this function:

bool ReadHex ( std::istringstream &  iss,
uint32 res,
uint32  length 
)
inline
87 {
88  std::istringstream::pos_type pos = iss.tellg();
89  iss >> std::hex >> res;
90  //uint32 size = uint32(iss.gcount());
91  if (length && uint32(iss.tellg() - pos) != length)
92  return false;
93  return !iss.fail() && !iss.eof();
94 }
IntFormatSpec< int, TypeSpec<'x'> > hex(int value)
float length(float v)
Definition: vectorMath.h:208
uint32_t uint32
Definition: g3dmath.h:168

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ReadInt32 ( std::istringstream &  iss,
int32 res 
)
inline
56 {
57  iss >> std::dec >> res;
58  return !iss.fail() && !iss.eof();
59 }

+ Here is the caller graph for this function:

std::string ReadSkip ( std::istringstream &  iss,
char  term 
)
inline
62 {
63  std::string res;
64  char c = iss.peek();
65  while (c != term && c != '\0')
66  {
67  res += c;
68  iss.ignore(1);
69  c = iss.peek();
70  }
71  return res;
72 }

+ Here is the caller graph for this function:

bool ReadUInt32 ( std::istringstream &  iss,
uint32 res 
)
inline
50 {
51  iss >> std::dec >> res;
52  return !iss.fail() && !iss.eof();
53 }

+ Here is the caller graph for this function: