MGF Server  2.1
Multigaze framework server
 All Classes Functions
CGDTextParameter.h
1 #pragma once
2 
3 #include <string>
4 
5 template <int length>
7 {
8 public:
9  CGDTextParameter() { setValue("-"); }
10 
11  std::string value() { return mValue; }
12 
13  CGDTextParameter & operator=(const std::string &rhs)
14  {
15  setValue(rhs);
16  return *this;
17  }
18 
19 private:
20  void setValue(std::string v)
21  {
22  if (v.length() > length)
23  v = v.substr(0, length);
24 
25  mValue = v;
26  }
27 
28 private:
29  std::string mValue;
30 };