nndeploy C++ API  0.2.0
nndeploy C++ API
Classes | Namespaces | Macros | Functions
param.h File Reference
#include "nndeploy/base/any.h"
#include "nndeploy/base/common.h"
#include "nndeploy/base/glic_stl_include.h"
#include "nndeploy/base/log.h"
#include "nndeploy/base/macro.h"
#include "nndeploy/base/rapidjson_include.h"
#include "nndeploy/base/status.h"
#include "nndeploy/base/string.h"
Include dependency graph for param.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  nndeploy::base::Param
 

Namespaces

 nndeploy
 
 nndeploy::base
 

Macros

#define PARAM_COPY(param_type)
 
#define PARAM_COPY_TO(param_type)
 

Functions

std::string nndeploy::base::prettyJsonStr (const std::string &json_str)
 
std::string nndeploy::base::removeJsonBrackets (const std::string &json_str)
 

Macro Definition Documentation

◆ PARAM_COPY

#define PARAM_COPY (   param_type)
Value:
public: \
virtual std::shared_ptr<nndeploy::base::Param> copy() { \
std::shared_ptr<nndeploy::base::Param> param(new param_type()); \
param_type *param_ptr = dynamic_cast<param_type *>(param.get()); \
*param_ptr = *this; \
return param; \
}

Definition at line 16 of file param.h.

◆ PARAM_COPY_TO

#define PARAM_COPY_TO (   param_type)
Value:
public: \
virtual nndeploy::base::Status copyTo(nndeploy::base::Param *param) { \
param_type *param_ptr = dynamic_cast<param_type *>(param); \
if (nullptr == param_ptr) { \
NNDEPLOY_LOGE("dynamic cast to %s failed\n", #param_type); \
} \
*param_ptr = *this; \
}
@ kStatusCodeOk
Definition: status.h:13
@ kStatusCodeErrorInvalidParam
Definition: status.h:21

Definition at line 25 of file param.h.