ONE - On-device Neural Engine
Loading...
Searching...
No Matches
nnfw::misc::GeneralConfigSource Class Reference

#include <GeneralConfigSource.h>

Collaboration diagram for nnfw::misc::GeneralConfigSource:

Public Member Functions

 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 GeneralConfigSource.h.

Constructor & Destructor Documentation

◆ GeneralConfigSource()

nnfw::misc::GeneralConfigSource::GeneralConfigSource ( )
default

Member Function Documentation

◆ get()

std::string nnfw::misc::GeneralConfigSource::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 24 of file GeneralConfigSource.cpp.

25{
26 auto itr = _map.find(key);
27 if (itr == _map.end())
28 {
29 return "";
30 }
31 else
32 {
33 return itr->second;
34 }
35}

Referenced by nnfw::misc::EnvConfigSource::get().

◆ set()

void nnfw::misc::GeneralConfigSource::set ( const std::string &  key,
const std::string &  val 
)

Definition at line 37 of file GeneralConfigSource.cpp.

37{ _map[key] = val; }

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