TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Trinity Namespace Reference

Namespaces

 Containers
 
 Currency
 
 Honor
 
 XP
 

Classes

class  AbsorbAuraOrderPred
 
struct  AIRelocationNotifier
 
class  AllCreaturesOfEntryInRange
 
class  AllFriendlyCreaturesInGrid
 
class  AllGameObjectsWithEntryInRange
 
class  AllWorldObjectsInRange
 
class  AnyAoETargetUnitInObjectRangeCheck
 
class  AnyAssistCreatureInRangeCheck
 
struct  AnyDeadUnitCheck
 
class  AnyDeadUnitObjectInRangeCheck
 
class  AnyDeadUnitSpellTargetInRangeCheck
 
class  AnyFriendlyUnitInObjectRangeCheck
 
class  AnyGroupedUnitInObjectRangeCheck
 
class  AnyPlayerInObjectRangeCheck
 
class  AnyUnfriendlyNoTotemUnitInObjectRangeCheck
 
class  AnyUnfriendlyUnitInObjectRangeCheck
 
class  AnyUnitInObjectRangeCheck
 
class  Battleground2ChatBuilder
 
class  BattlegroundChatBuilder
 
class  BroadcastTextBuilder
 
class  CallOfHelpCreatureInRangeDo
 
struct  CreatureLastSearcher
 
struct  CreatureListSearcher
 
struct  CreatureRelocationNotifier
 
struct  CreatureSearcher
 
struct  CreatureWorker
 
class  CustomChatTextBuilder
 
struct  DelayedUnitRelocation
 
struct  discrete_distribution_param
 
class  FriendlyCCedInRange
 
class  FriendlyMissingBuffInRange
 
class  GameObjectFocusCheck
 
class  GameObjectInRangeCheck
 
struct  GameObjectLastSearcher
 
struct  GameObjectListSearcher
 
struct  GameObjectSearcher
 
struct  GameObjectWorker
 
struct  GridUpdater
 
class  HealthPctOrderPred
 
class  HeightDifferenceCheck
 
class  LocalizedPacketDo
 
class  LocalizedPacketListDo
 
struct  MessageDistDeliverer
 
class  MostHPMissingInRange
 
class  NearestAssistCreatureInCreatureRangeCheck
 
class  NearestAttackableUnitInObjectRangeCheck
 
class  NearestCreatureEntryWithLiveStateInObjectRangeCheck
 
class  NearestGameObjectCheck
 
class  NearestGameObjectEntryInObjectRangeCheck
 
class  NearestGameObjectFishingHole
 
class  NearestGameObjectTypeInObjectRangeCheck
 
class  NearestHostileUnitCheck
 
class  NearestHostileUnitInAggroRangeCheck
 
class  NearestHostileUnitInAttackDistanceCheck
 
class  NearestPlayerInObjectRangeCheck
 
class  ObjectDistanceOrderPred
 
class  ObjectGUIDCheck
 
class  ObjectTypeIdCheck
 
struct  ObjectUpdater
 
class  PlayerAtMinimumRangeAway
 
struct  PlayerDistWorker
 
struct  PlayerLastSearcher
 
struct  PlayerListSearcher
 
struct  PlayerRelocationNotifier
 
struct  PlayerSearcher
 
struct  PlayerWorker
 
class  PowerPctOrderPred
 
class  RespawnDo
 
class  ThreatOrderPred
 
class  UnitAuraCheck
 
struct  UnitLastSearcher
 
struct  UnitListSearcher
 
struct  UnitSearcher
 
struct  VisibleChangesNotifier
 
struct  VisibleNotifier
 
struct  WorldObjectLastSearcher
 
struct  WorldObjectListSearcher
 
struct  WorldObjectSearcher
 
struct  WorldObjectSpellAreaTargetCheck
 
struct  WorldObjectSpellConeTargetCheck
 
struct  WorldObjectSpellNearbyTargetCheck
 
struct  WorldObjectSpellTargetCheck
 
struct  WorldObjectSpellTrajTargetCheck
 
struct  WorldObjectWorker
 
class  WorldWorldTextBuilder
 

Functions

template<typename T , typename... Args>
std::unique_ptr< T > make_unique (Args &&...args)
 std::make_unique implementation (TODO: remove this once C++14 is supported) More...
 
void Assert (char const *file, int line, char const *function, char const *message)
 
void Assert (char const *file, int line, char const *function, char const *message, char const *format,...)
 
void Fatal (char const *file, int line, char const *function, char const *message,...)
 
void Error (char const *file, int line, char const *function, char const *message)
 
void Warning (char const *file, int line, char const *function, char const *message)
 
void Abort (char const *file, int line, char const *function)
 
void AbortHandler (int)
 
template<typename Format , typename... Args>
std::string StringFormat (Format &&fmt, Args &&...args)
 Default TC string format function. More...
 
bool IsFormatEmptyOrNull (const char *fmt)
 Returns true if the given char pointer is null. More...
 
bool IsFormatEmptyOrNull (std::string const &fmt)
 Returns true if the given std::string is empty. More...
 
template<class RET_TYPE , int CENTER_VAL>
RET_TYPE Compute (float x, float y, float center_offset, float size)
 
GridCoord ComputeGridCoord (float x, float y)
 
CellCoord ComputeCellCoord (float x, float y)
 
CellCoord ComputeCellCoord (float x, float y, float &x_off, float &y_off)
 
void NormalizeMapCoord (float &c)
 
bool IsValidMapCoord (float c)
 
bool IsValidMapCoord (float x, float y)
 
bool IsValidMapCoord (float x, float y, float z)
 
bool IsValidMapCoord (float x, float y, float z, float o)
 
template<class SPECIFIC_TYPE , class KEY_TYPE >
bool Insert (ContainerUnorderedMap< SPECIFIC_TYPE, KEY_TYPE > &elements, KEY_TYPE const &handle, SPECIFIC_TYPE *obj)
 
template<class SPECIFIC_TYPE , class KEY_TYPE >
bool Insert (ContainerUnorderedMap< TypeNull, KEY_TYPE > &, KEY_TYPE const &, SPECIFIC_TYPE *)
 
template<class SPECIFIC_TYPE , class KEY_TYPE , class T >
bool Insert (ContainerUnorderedMap< T, KEY_TYPE > &, KEY_TYPE const &, SPECIFIC_TYPE *)
 
template<class SPECIFIC_TYPE , class KEY_TYPE , class H , class T >
bool Insert (ContainerUnorderedMap< TypeList< H, T >, KEY_TYPE > &elements, KEY_TYPE const &handle, SPECIFIC_TYPE *obj)
 
template<class SPECIFIC_TYPE , class KEY_TYPE >
SPECIFIC_TYPE * Find (ContainerUnorderedMap< SPECIFIC_TYPE, KEY_TYPE > const &elements, KEY_TYPE const &handle, SPECIFIC_TYPE *)
 
template<class SPECIFIC_TYPE , class KEY_TYPE >
SPECIFIC_TYPE * Find (ContainerUnorderedMap< TypeNull, KEY_TYPE > const &, KEY_TYPE const &, SPECIFIC_TYPE *)
 
template<class SPECIFIC_TYPE , class KEY_TYPE , class T >
SPECIFIC_TYPE * Find (ContainerUnorderedMap< T, KEY_TYPE > const &, KEY_TYPE const &, SPECIFIC_TYPE *)
 
template<class SPECIFIC_TYPE , class KEY_TYPE , class H , class T >
SPECIFIC_TYPE * Find (ContainerUnorderedMap< TypeList< H, T >, KEY_TYPE > const &elements, KEY_TYPE const &handle, SPECIFIC_TYPE *)
 
template<class SPECIFIC_TYPE , class KEY_TYPE >
bool Remove (ContainerUnorderedMap< SPECIFIC_TYPE, KEY_TYPE > &elements, KEY_TYPE const &handle, SPECIFIC_TYPE *)
 
template<class SPECIFIC_TYPE , class KEY_TYPE >
bool Remove (ContainerUnorderedMap< TypeNull, KEY_TYPE > &, KEY_TYPE const &, SPECIFIC_TYPE *)
 
template<class SPECIFIC_TYPE , class KEY_TYPE , class T >
bool Remove (ContainerUnorderedMap< T, KEY_TYPE > &, KEY_TYPE const &, SPECIFIC_TYPE *)
 
template<class SPECIFIC_TYPE , class KEY_TYPE , class H , class T >
bool Remove (ContainerUnorderedMap< TypeList< H, T >, KEY_TYPE > &elements, KEY_TYPE const &handle, SPECIFIC_TYPE *)
 
template<class SPECIFIC_TYPE >
size_t Count (ContainerMapList< SPECIFIC_TYPE > const &elements, SPECIFIC_TYPE *)
 
template<class SPECIFIC_TYPE >
size_t Count (ContainerMapList< TypeNull > const &, SPECIFIC_TYPE *)
 
template<class SPECIFIC_TYPE , class T >
size_t Count (ContainerMapList< T > const &, SPECIFIC_TYPE *)
 
template<class SPECIFIC_TYPE , class T >
size_t Count (ContainerMapList< TypeList< SPECIFIC_TYPE, T >> const &elements, SPECIFIC_TYPE *fake)
 
template<class SPECIFIC_TYPE , class H , class T >
size_t Count (ContainerMapList< TypeList< H, T >> const &elements, SPECIFIC_TYPE *fake)
 
template<class SPECIFIC_TYPE >
SPECIFIC_TYPE * Insert (ContainerMapList< SPECIFIC_TYPE > &elements, SPECIFIC_TYPE *obj)
 
template<class SPECIFIC_TYPE >
SPECIFIC_TYPE * Insert (ContainerMapList< TypeNull > &, SPECIFIC_TYPE *)
 
template<class SPECIFIC_TYPE , class T >
SPECIFIC_TYPE * Insert (ContainerMapList< T > &, SPECIFIC_TYPE *)
 
template<class SPECIFIC_TYPE , class H , class T >
SPECIFIC_TYPE * Insert (ContainerMapList< TypeList< H, T >> &elements, SPECIFIC_TYPE *obj)
 

Function Documentation

DECLSPEC_NORETURN TC_COMMON_API void Trinity::Abort ( char const file,
int  line,
char const function 
)
92 {
93  fprintf(stderr, "\n%s:%i in %s ABORTED.\n",
94  file, line, function);
95  *((volatile int*)NULL) = 0;
96  exit(1);
97 }
FMT_API int fprintf(std::FILE *f, CStringRef format, ArgList args)
arena_t NULL
Definition: jemalloc_internal.h:624

+ Here is the call graph for this function:

DECLSPEC_NORETURN TC_COMMON_API void Trinity::AbortHandler ( int  )
100 {
101  // nothing useful to log here, no way to pass args
102  *((volatile int*)NULL) = 0;
103  exit(1);
104 }
arena_t NULL
Definition: jemalloc_internal.h:624

+ Here is the caller graph for this function:

DECLSPEC_NORETURN TC_COMMON_API void Trinity::Assert ( char const file,
int  line,
char const function,
char const message 
)
40 {
41  fprintf(stderr, "\n%s:%i in %s ASSERTION FAILED:\n %s\n",
42  file, line, function, message);
43  *((volatile int*)NULL) = 0;
44  exit(1);
45 }
FMT_API int fprintf(std::FILE *f, CStringRef format, ArgList args)
arena_t NULL
Definition: jemalloc_internal.h:624

+ Here is the call graph for this function:

DECLSPEC_NORETURN TC_COMMON_API void Trinity::Assert ( char const file,
int  line,
char const function,
char const message,
char const format,
  ... 
)
48 {
49  va_list args;
50  va_start(args, format);
51 
52  fprintf(stderr, "\n%s:%i in %s ASSERTION FAILED:\n %s ", file, line, function, message);
53  vfprintf(stderr, format, args);
54  fprintf(stderr, "\n");
55  fflush(stderr);
56 
57  va_end(args);
58  *((volatile int*)NULL) = 0;
59  exit(1);
60 }
void format(BasicFormatter< Char > &f, const Char *&format_str, const T &value)
Definition: format.h:2963
FMT_API int fprintf(std::FILE *f, CStringRef format, ArgList args)
arena_t NULL
Definition: jemalloc_internal.h:624

+ Here is the call graph for this function:

template<class RET_TYPE , int CENTER_VAL>
RET_TYPE Trinity::Compute ( float  x,
float  y,
float  center_offset,
float  size 
)
inline
178  {
179  // calculate and store temporary values in double format for having same result as same mySQL calculations
180  double x_offset = (double(x) - center_offset)/size;
181  double y_offset = (double(y) - center_offset)/size;
182 
183  int x_val = int(x_offset + CENTER_VAL + 0.5f);
184  int y_val = int(y_offset + CENTER_VAL + 0.5f);
185  return RET_TYPE(x_val, y_val);
186  }
G3D::int16 y
Definition: Vector2int16.h:38
G3D::int16 x
Definition: Vector2int16.h:37

+ Here is the caller graph for this function:

CellCoord Trinity::ComputeCellCoord ( float  x,
float  y 
)
inline
194  {
195  return Compute<CellCoord, CENTER_GRID_CELL_ID>(x, y, CENTER_GRID_CELL_OFFSET, SIZE_OF_GRID_CELL);
196  }
#define SIZE_OF_GRID_CELL
Definition: GridDefines.h:47
G3D::int16 y
Definition: Vector2int16.h:38
#define CENTER_GRID_CELL_OFFSET
Definition: GridDefines.h:50
G3D::int16 x
Definition: Vector2int16.h:37

+ Here is the caller graph for this function:

CellCoord Trinity::ComputeCellCoord ( float  x,
float  y,
float &  x_off,
float &  y_off 
)
inline
199  {
200  double x_offset = (double(x) - CENTER_GRID_CELL_OFFSET)/SIZE_OF_GRID_CELL;
201  double y_offset = (double(y) - CENTER_GRID_CELL_OFFSET)/SIZE_OF_GRID_CELL;
202 
203  int x_val = int(x_offset + CENTER_GRID_CELL_ID + 0.5f);
204  int y_val = int(y_offset + CENTER_GRID_CELL_ID + 0.5f);
205  x_off = (float(x_offset) - float(x_val) + CENTER_GRID_CELL_ID) * SIZE_OF_GRID_CELL;
206  y_off = (float(y_offset) - float(y_val) + CENTER_GRID_CELL_ID) * SIZE_OF_GRID_CELL;
207  return CellCoord(x_val, y_val);
208  }
#define CENTER_GRID_CELL_ID
Definition: GridDefines.h:49
#define SIZE_OF_GRID_CELL
Definition: GridDefines.h:47
G3D::int16 y
Definition: Vector2int16.h:38
#define CENTER_GRID_CELL_OFFSET
Definition: GridDefines.h:50
CoordPair< TOTAL_NUMBER_OF_CELLS_PER_MAP > CellCoord
Definition: GridDefines.h:172
G3D::int16 x
Definition: Vector2int16.h:37
GridCoord Trinity::ComputeGridCoord ( float  x,
float  y 
)
inline
189  {
190  return Compute<GridCoord, CENTER_GRID_ID>(x, y, CENTER_GRID_OFFSET, SIZE_OF_GRIDS);
191  }
#define SIZE_OF_GRIDS
Definition: GridDefines.h:39
G3D::int16 y
Definition: Vector2int16.h:38
#define CENTER_GRID_OFFSET
Definition: GridDefines.h:42
G3D::int16 x
Definition: Vector2int16.h:37

+ Here is the caller graph for this function:

template<class SPECIFIC_TYPE >
size_t Trinity::Count ( ContainerMapList< SPECIFIC_TYPE > const elements,
SPECIFIC_TYPE *   
)
133  {
134  return elements._element.getSize();
135  }
GridRefManager< OBJECT > _element
Definition: TypeContainer.h:43

+ Here is the caller graph for this function:

template<class SPECIFIC_TYPE >
size_t Trinity::Count ( ContainerMapList< TypeNull > const ,
SPECIFIC_TYPE *   
)
139  {
140  return 0;
141  }
template<class SPECIFIC_TYPE , class T >
size_t Trinity::Count ( ContainerMapList< T > const ,
SPECIFIC_TYPE *   
)
145  {
146  return 0;
147  }
template<class SPECIFIC_TYPE , class T >
size_t Trinity::Count ( ContainerMapList< TypeList< SPECIFIC_TYPE, T >> const elements,
SPECIFIC_TYPE *  fake 
)
151  {
152  return Count(elements._elements, fake);
153  }

+ Here is the call graph for this function:

template<class SPECIFIC_TYPE , class H , class T >
size_t Trinity::Count ( ContainerMapList< TypeList< H, T >> const elements,
SPECIFIC_TYPE *  fake 
)
157  {
158  return Count(elements._TailElements, fake);
159  }

+ Here is the call graph for this function:

DECLSPEC_NORETURN TC_COMMON_API void DECLSPEC_NORETURN TC_COMMON_API void DECLSPEC_NORETURN TC_COMMON_API void Trinity::Error ( char const file,
int  line,
char const function,
char const message 
)
78 {
79  fprintf(stderr, "\n%s:%i in %s ERROR:\n %s\n",
80  file, line, function, message);
81  *((volatile int*)NULL) = 0;
82  exit(1);
83 }
FMT_API int fprintf(std::FILE *f, CStringRef format, ArgList args)
arena_t NULL
Definition: jemalloc_internal.h:624

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

DECLSPEC_NORETURN TC_COMMON_API void DECLSPEC_NORETURN TC_COMMON_API void Trinity::Fatal ( char const file,
int  line,
char const function,
char const message,
  ... 
)
63 {
64  va_list args;
65  va_start(args, message);
66 
67  fprintf(stderr, "\n%s:%i in %s FATAL ERROR:\n ", file, line, function);
68  vfprintf(stderr, message, args);
69  fprintf(stderr, "\n");
70  fflush(stderr);
71 
72  std::this_thread::sleep_for(std::chrono::seconds(10));
73  *((volatile int*)NULL) = 0;
74  exit(1);
75 }
FMT_API int fprintf(std::FILE *f, CStringRef format, ArgList args)
arena_t NULL
Definition: jemalloc_internal.h:624
float seconds()
Definition: units.h:97

+ Here is the call graph for this function:

template<class SPECIFIC_TYPE , class KEY_TYPE >
SPECIFIC_TYPE* Trinity::Find ( ContainerUnorderedMap< SPECIFIC_TYPE, KEY_TYPE > const elements,
KEY_TYPE const handle,
SPECIFIC_TYPE *   
)
75  {
76  auto i = elements._element.find(handle);
77  if (i == elements._element.end())
78  return nullptr;
79  else
80  return i->second;
81  }
std::unordered_map< KEY_TYPE, OBJECT * > _element
Definition: TypeContainer.h:61

+ Here is the caller graph for this function:

template<class SPECIFIC_TYPE , class KEY_TYPE >
SPECIFIC_TYPE* Trinity::Find ( ContainerUnorderedMap< TypeNull, KEY_TYPE > const ,
KEY_TYPE const ,
SPECIFIC_TYPE *   
)
85  {
86  return nullptr;
87  }
template<class SPECIFIC_TYPE , class KEY_TYPE , class T >
SPECIFIC_TYPE* Trinity::Find ( ContainerUnorderedMap< T, KEY_TYPE > const ,
KEY_TYPE const ,
SPECIFIC_TYPE *   
)
91  {
92  return nullptr;
93  }
template<class SPECIFIC_TYPE , class KEY_TYPE , class H , class T >
SPECIFIC_TYPE* Trinity::Find ( ContainerUnorderedMap< TypeList< H, T >, KEY_TYPE > const elements,
KEY_TYPE const handle,
SPECIFIC_TYPE *   
)
97  {
98  SPECIFIC_TYPE* ret = Find(elements._elements, handle, (SPECIFIC_TYPE*)nullptr);
99  return ret ? ret : Find(elements._TailElements, handle, (SPECIFIC_TYPE*)nullptr);
100  }
SPECIFIC_TYPE * Find(ContainerUnorderedMap< TypeList< H, T >, KEY_TYPE > const &elements, KEY_TYPE const &handle, SPECIFIC_TYPE *)
Definition: TypeContainerFunctions.h:96

+ Here is the call graph for this function:

template<class SPECIFIC_TYPE , class KEY_TYPE >
bool Trinity::Insert ( ContainerUnorderedMap< SPECIFIC_TYPE, KEY_TYPE > &  elements,
KEY_TYPE const handle,
SPECIFIC_TYPE *  obj 
)
39  {
40  auto i = elements._element.find(handle);
41  if (i == elements._element.end())
42  {
43  elements._element[handle] = obj;
44  return true;
45  }
46  else
47  {
48  ASSERT(i->second == obj, "Object with certain key already in but objects are different!");
49  return false;
50  }
51  }
#define ASSERT
Definition: Errors.h:55
std::unordered_map< KEY_TYPE, OBJECT * > _element
Definition: TypeContainer.h:61

+ Here is the caller graph for this function:

template<class SPECIFIC_TYPE , class KEY_TYPE >
bool Trinity::Insert ( ContainerUnorderedMap< TypeNull, KEY_TYPE > &  ,
KEY_TYPE const ,
SPECIFIC_TYPE *   
)
55  {
56  return false;
57  }
template<class SPECIFIC_TYPE , class KEY_TYPE , class T >
bool Trinity::Insert ( ContainerUnorderedMap< T, KEY_TYPE > &  ,
KEY_TYPE const ,
SPECIFIC_TYPE *   
)
61  {
62  return false;
63  }
template<class SPECIFIC_TYPE , class KEY_TYPE , class H , class T >
bool Trinity::Insert ( ContainerUnorderedMap< TypeList< H, T >, KEY_TYPE > &  elements,
KEY_TYPE const handle,
SPECIFIC_TYPE *  obj 
)
67  {
68  bool ret = Insert(elements._elements, handle, obj);
69  return ret ? ret : Insert(elements._TailElements, handle, obj);
70  }
ContainerUnorderedMap< T, KEY_TYPE > _TailElements
Definition: TypeContainer.h:73
ContainerUnorderedMap< H, KEY_TYPE > _elements
Definition: TypeContainer.h:72
SPECIFIC_TYPE * Insert(ContainerMapList< TypeList< H, T >> &elements, SPECIFIC_TYPE *obj)
Definition: TypeContainerFunctions.h:185

+ Here is the call graph for this function:

template<class SPECIFIC_TYPE >
SPECIFIC_TYPE* Trinity::Insert ( ContainerMapList< SPECIFIC_TYPE > &  elements,
SPECIFIC_TYPE *  obj 
)
164  {
165  //elements._element[hdl] = obj;
166  obj->AddToGrid(elements._element);
167  return obj;
168  }
GridRefManager< OBJECT > _element
Definition: TypeContainer.h:43
template<class SPECIFIC_TYPE >
SPECIFIC_TYPE* Trinity::Insert ( ContainerMapList< TypeNull > &  ,
SPECIFIC_TYPE *   
)
172  {
173  return nullptr;
174  }
template<class SPECIFIC_TYPE , class T >
SPECIFIC_TYPE* Trinity::Insert ( ContainerMapList< T > &  ,
SPECIFIC_TYPE *   
)
179  {
180  return nullptr; // a missed
181  }
template<class SPECIFIC_TYPE , class H , class T >
SPECIFIC_TYPE* Trinity::Insert ( ContainerMapList< TypeList< H, T >> &  elements,
SPECIFIC_TYPE *  obj 
)
186  {
187  SPECIFIC_TYPE* t = Insert(elements._elements, obj);
188  return (t != nullptr ? t : Insert(elements._TailElements, obj));
189  }
SPECIFIC_TYPE * Insert(ContainerMapList< TypeList< H, T >> &elements, SPECIFIC_TYPE *obj)
Definition: TypeContainerFunctions.h:185

+ Here is the call graph for this function:

bool Trinity::IsFormatEmptyOrNull ( const char *  fmt)
inline

Returns true if the given char pointer is null.

35  {
36  return fmt == nullptr;
37  }
Definition: format.h:285

+ Here is the caller graph for this function:

bool Trinity::IsFormatEmptyOrNull ( std::string const fmt)
inline

Returns true if the given std::string is empty.

41  {
42  return fmt.empty();
43  }
Definition: format.h:285
bool Trinity::IsValidMapCoord ( float  c)
inline
219  {
220  return std::isfinite(c) && (std::fabs(c) <= MAP_HALFSIZE - 0.5f);
221  }
#define MAP_HALFSIZE
Definition: GridDefines.h:57

+ Here is the caller graph for this function:

bool Trinity::IsValidMapCoord ( float  x,
float  y 
)
inline
224  {
225  return IsValidMapCoord(x) && IsValidMapCoord(y);
226  }
bool IsValidMapCoord(float x, float y, float z, float o)
Definition: GridDefines.h:233
G3D::int16 y
Definition: Vector2int16.h:38
G3D::int16 x
Definition: Vector2int16.h:37

+ Here is the call graph for this function:

bool Trinity::IsValidMapCoord ( float  x,
float  y,
float  z 
)
inline
229  {
230  return IsValidMapCoord(x, y) && IsValidMapCoord(z);
231  }
bool IsValidMapCoord(float x, float y, float z, float o)
Definition: GridDefines.h:233
G3D::int16 z
Definition: Vector3int16.h:46
G3D::int16 y
Definition: Vector2int16.h:38
G3D::int16 x
Definition: Vector2int16.h:37

+ Here is the call graph for this function:

bool Trinity::IsValidMapCoord ( float  x,
float  y,
float  z,
float  o 
)
inline
234  {
235  return IsValidMapCoord(x, y, z) && std::isfinite(o);
236  }
bool IsValidMapCoord(float x, float y, float z, float o)
Definition: GridDefines.h:233
G3D::int16 z
Definition: Vector3int16.h:46
G3D::int16 y
Definition: Vector2int16.h:38
G3D::int16 x
Definition: Vector2int16.h:37

+ Here is the call graph for this function:

template<typename T , typename... Args>
std::unique_ptr<T> Trinity::make_unique ( Args &&...  args)

std::make_unique implementation (TODO: remove this once C++14 is supported)

177  {
178  return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
179  }

+ Here is the caller graph for this function:

void Trinity::NormalizeMapCoord ( float &  c)
inline
211  {
212  if (c > MAP_HALFSIZE - 0.5f)
213  c = MAP_HALFSIZE - 0.5f;
214  else if (c < -(MAP_HALFSIZE - 0.5f))
215  c = -(MAP_HALFSIZE - 0.5f);
216  }
#define MAP_HALFSIZE
Definition: GridDefines.h:57

+ Here is the caller graph for this function:

template<class SPECIFIC_TYPE , class KEY_TYPE >
bool Trinity::Remove ( ContainerUnorderedMap< SPECIFIC_TYPE, KEY_TYPE > &  elements,
KEY_TYPE const handle,
SPECIFIC_TYPE *   
)
105  {
106  elements._element.erase(handle);
107  return true;
108  }
std::unordered_map< KEY_TYPE, OBJECT * > _element
Definition: TypeContainer.h:61

+ Here is the caller graph for this function:

template<class SPECIFIC_TYPE , class KEY_TYPE >
bool Trinity::Remove ( ContainerUnorderedMap< TypeNull, KEY_TYPE > &  ,
KEY_TYPE const ,
SPECIFIC_TYPE *   
)
112  {
113  return false;
114  }
template<class SPECIFIC_TYPE , class KEY_TYPE , class T >
bool Trinity::Remove ( ContainerUnorderedMap< T, KEY_TYPE > &  ,
KEY_TYPE const ,
SPECIFIC_TYPE *   
)
118  {
119  return false;
120  }
template<class SPECIFIC_TYPE , class KEY_TYPE , class H , class T >
bool Trinity::Remove ( ContainerUnorderedMap< TypeList< H, T >, KEY_TYPE > &  elements,
KEY_TYPE const handle,
SPECIFIC_TYPE *   
)
124  {
125  bool ret = Remove(elements._elements, handle, (SPECIFIC_TYPE*)nullptr);
126  return ret ? ret : Remove(elements._TailElements, handle, (SPECIFIC_TYPE*)nullptr);
127  }
ContainerUnorderedMap< T, KEY_TYPE > _TailElements
Definition: TypeContainer.h:73
ContainerUnorderedMap< H, KEY_TYPE > _elements
Definition: TypeContainer.h:72
bool Remove(ContainerUnorderedMap< TypeList< H, T >, KEY_TYPE > &elements, KEY_TYPE const &handle, SPECIFIC_TYPE *)
Definition: TypeContainerFunctions.h:123

+ Here is the call graph for this function:

template<typename Format , typename... Args>
std::string Trinity::StringFormat ( Format &&  fmt,
Args &&...  args 
)
inline

Default TC string format function.

29  {
30  return fmt::sprintf(std::forward<Format>(fmt), std::forward<Args>(args)...);
31  }
std::string sprintf(CStringRef format, ArgList args)
Definition: format.h:3096
Definition: format.h:285

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

TC_COMMON_API void Trinity::Warning ( char const file,
int  line,
char const function,
char const message 
)
86 {
87  fprintf(stderr, "\n%s:%i in %s WARNING:\n %s\n",
88  file, line, function, message);
89 }
FMT_API int fprintf(std::FILE *f, CStringRef format, ArgList args)

+ Here is the call graph for this function: