18 #ifndef __IPSDKUTIL_LOGMESSAGEMANAGER_H__ 19 #define __IPSDKUTIL_LOGMESSAGEMANAGER_H__ 24 #pragma warning (push) 25 #pragma warning (disable : 4275 4251) 30 #include <boost/noncopyable.hpp> 31 #include <boost/checked_delete.hpp> 35 template<
typename Target,
typename Source>
36 Target lexical_cast(
const Source &arg);
48 friend void boost::checked_delete(T * x) BOOST_NOEXCEPT;
64 const std::string& getLibraryName()
const;
67 template <
typename EnumT>
70 return existsMessage(
typeid(EnumT).name(), (
ipInt32)messageId);
74 bool existsMessage(
const std::string& enumTypeStr,
79 template <
typename EnumT>
82 return getMessage(
typeid(EnumT).name(), (
ipInt32)messageId);
87 const std::string& getMessage(
const std::string& enumTypeStr,
95 template <
typename EnumT>
98 removeMessage(
typeid(EnumT).name(), (
ipInt32)messageId);
103 void removeMessage(
const std::string& enumTypeStr,
108 template <
typename EnumT>
110 const std::string& messageStr)
112 addMessage(
typeid(EnumT).name(), (
ipInt32)messageId, messageStr);
117 void addMessage(
const std::string& enumTypeStr,
119 const std::string& messageStr);
132 void readFile(
const boost::filesystem::path& msgFilePath,
135 boost::lexical_cast<ipInt32, const std::string&>);
157 #pragma warning (pop) 159 #endif // __IPSDKUTIL_LOGMESSAGEMANAGER_H__ Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
MessageColl _messageColl
message map associating ids with corresponding message
Definition: LogMessageManager.h:149
ipInt32(* EnumStringToIntFunc)(const std::string &enumStrValue)
defining a function type for string to integer convertions
Definition: EnumUtils.h:27
int32_t ipInt32
Base types definition.
Definition: BaseTypes.h:52
Definition: DataItemNodeHdrMacrosDetails.h:48
Base types for multiplatform compatibility.
std::map< std::string, MessageMap > MessageColl
map associating a string (an enumerate typeid) to a MessageMap
Definition: LogMessageManager.h:146
bool existsMessage(const EnumT &messageId) const
template member for easy check whether a message is associated to a given id
Definition: LogMessageManager.h:68
#define IPSDKUTIL_API
Import/Export macro for library IPSDKUtil.
Definition: IPSDKUtilExports.h:27
std::map< ipInt32, std::string > MessageMap
map associating a message id to a string
Definition: LogMessageManager.h:143
Log message manager for ipsdk libraries.
Definition: LogMessageManager.h:44
std::string _libraryName
library name for message manager
Definition: LogMessageManager.h:140
Definition of import/export macro for library.
void addMessage(const EnumT &messageId, const std::string &messageStr)
template member for easy add a new message
Definition: LogMessageManager.h:109
void removeMessage(const EnumT &messageId)
template member for easy remove an existing message
Definition: LogMessageManager.h:96
const std::string & getMessage(const EnumT &messageId)
template member for easy retrieve a message given an id
Definition: LogMessageManager.h:80
Utility functions for enumerate manipulation.