Panoptes 1.0.0
Endpoint Detection and Response
Loading...
Searching...
No Matches
ResourceCore.cpp File Reference
#include "ResourceCore.h"
#include <string>
#include <unordered_map>

Go to the source code of this file.

Macros

#define RESOURCES_EXPORTS

Functions

RESOURCES_API int GetResourceErrorCode (const char *errorName)
RESOURCES_API const char * GetResourceErrorString (int errorCode)

Macro Definition Documentation

◆ RESOURCES_EXPORTS

#define RESOURCES_EXPORTS

Definition at line 1 of file ResourceCore.cpp.

Function Documentation

◆ GetResourceErrorCode()

RESOURCES_API int GetResourceErrorCode ( const char * errorName)

Definition at line 71 of file ResourceCore.cpp.

71 {
72 auto it = errorCodeMap.find(errorName);
73 return (it != errorCodeMap.end()) ? it->second : NOT_SET;
74}
#define NOT_SET

References NOT_SET, and RESOURCES_API.

◆ GetResourceErrorString()

RESOURCES_API const char * GetResourceErrorString ( int errorCode)

Definition at line 76 of file ResourceCore.cpp.

76 {
77 auto it = errorStringMap.find(errorCode);
78 return (it != errorStringMap.end()) ? it->second : "Unknown error code";
79}

References RESOURCES_API.