Now you can download a copy of these docs so you can use them offline! Download now
StringCache.cpp
1 /*
2  * StringCache.cpp
3  *
4  * Created on: Oct 16, 2012
5  * Author: Mitchell Wills
6  */
7 
8 #include <map>
9 #include "networktables2/util/StringCache.h"
10 
11 using namespace std;
12 
14 }
15 StringCache::~StringCache(){
16 }
17 
18 std::string& StringCache::Get(const std::string& input){
19  map<std::string, std::string>::iterator itr = cache.find(input);
20  if(itr != cache.end()){
21  return itr->second;
22  }
23  else{
24  cache[input] = Calc(input);
25  return cache[input];
26  }
27 }

Generated on Sat Apr 26 2014 12:26:45 for WPILibC++ by doxygen 1.8.6