Anp::StorekNNData Class Reference

#include <TestDataModule.h>

Inheritance diagram for Anp::StorekNNData:
Anp::Base

List of all members.

Public Member Functions

 StorekNNData ()
virtual ~StorekNNData ()
bool Add (const std::string &key, float data)
bool Get (const std::string &key, float &data)

Private Attributes

std::map< std::string, float > fData

Detailed Description

Definition at line 23 of file TestDataModule.h.


Constructor & Destructor Documentation

StorekNNData::StorekNNData (  ) 

Definition at line 33 of file TestDataModule.cxx.

00034 {
00035 }

StorekNNData::~StorekNNData (  )  [virtual]

Definition at line 38 of file TestDataModule.cxx.

00039 {
00040 }


Member Function Documentation

bool StorekNNData::Add ( const std::string &  key,
float  data 
)

Definition at line 43 of file TestDataModule.cxx.

References fData.

00044 {
00045    return fData.insert(map<string, float>::value_type(key, data)).second;
00046 }

bool StorekNNData::Get ( const std::string &  key,
float &  data 
)

Definition at line 49 of file TestDataModule.cxx.

References fData, and Munits::second.

00050 {
00051    map<string, float>::const_iterator fit = fData.find(key);
00052    if(fit != fData.end())
00053    {
00054       data = fit -> second;
00055       return true;
00056    }
00057 
00058    return false;
00059 }


Member Data Documentation

std::map<std::string, float> Anp::StorekNNData::fData [private]

Definition at line 35 of file TestDataModule.h.

Referenced by Add(), and Get().


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

Generated on 18 Oct 2018 for loon by  doxygen 1.6.1