ONE - On-device Neural Engine
Loading...
Searching...
No Matches
nnfw::misc::EnvConfigSource Class Referencefinal

#include <EnvConfigSource.h>

Collaboration diagram for nnfw::misc::EnvConfigSource:

Public Member Functions

std::string get (const std::string &key) const override
 get the value for the matching key
 
- Public Member Functions inherited from nnfw::misc::GeneralConfigSource
 GeneralConfigSource ()=default
 
std::string get (const std::string &key) const override
 get the value for the matching key
 
void set (const std::string &key, const std::string &val)
 
- Public Member Functions inherited from nnfw::misc::IConfigSource
virtual ~IConfigSource ()=default
 Destroy the IConfigSource object.
 

Detailed Description

Definition at line 29 of file EnvConfigSource.h.

Member Function Documentation

◆ get()

std::string nnfw::misc::EnvConfigSource::get ( const std::string &  key) const
overridevirtual

get the value for the matching key

Parameters
keystring key to search
Returns
string value associated with the key

Implements nnfw::misc::IConfigSource.

Definition at line 26 of file EnvConfigSource.cpp.

27{
28 const char *value = std::getenv(key.c_str());
29 if (value != nullptr)
30 {
31 return value;
32 }
33 else
34 {
35 return GeneralConfigSource::get(key);
36 }
37}
std::string get(const std::string &key) const override
get the value for the matching key

References nnfw::misc::GeneralConfigSource::get().


The documentation for this class was generated from the following files: