ManaPlus
Macros
stringdefines.h File Reference

(986a3bf)

#include "localconsts.h"

Go to the source code of this file.

Macros

#define stringEnumStart(type)
 
#define strEnumDef(prefix, name)    mStringsArray[#name] = prefix::name; \
 
#define strEnumDef2(prefix, name, str)
 
#define stringEnumEnd    }
 

Macro Definition Documentation

◆ strEnumDef

#define strEnumDef (   prefix,
  name 
)     mStringsArray[#name] = prefix::name; \

Definition at line 41 of file stringdefines.h.

◆ strEnumDef2

#define strEnumDef2 (   prefix,
  name,
  str 
)
Value:
mStringsArray[#name] = prefix::name; \
mStringsArray[str] = prefix::name;
std::map< std::string, AttributesT > mStringsArray

Definition at line 44 of file stringdefines.h.

◆ stringEnumEnd

#define stringEnumEnd    }

Definition at line 48 of file stringdefines.h.

◆ stringEnumStart

#define stringEnumStart (   type)
Value:
std::map<std::string, type> mStringsArray; \
bool find(const std::string &key) \
{ \
return mStringsArray.find(key) != mStringsArray.end(); \
} \
type get(const std::string &key) \
{ \
return mStringsArray[key]; \
} \
void init() \
{ \
mStringsArray.clear();
bool find(const std::string &key)
void init()
Definition: playerinfo.cpp:434

Definition at line 27 of file stringdefines.h.