12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- //
- #include "stdafx.h"
- #include "ResDataObject.h"
- #include "Collimator.ConfigInfo.hpp"
- using namespace DIOS::Dev::Detail;
- using namespace DIOS::Dev::Detail::Collimator;
- //-----------------------------------------------------------------------------
- // ConfigInfo
- //-----------------------------------------------------------------------------
- ConfigInfo::ConfigInfo (const char* Key, const char* strType, const char* strAccess, const char* strRequired, const char* strDefaultValue)
- {
- strConfKey = Key;
- ResDataObject temp;
- temp.update ("Type", strType);
- temp.update ("Access", strAccess);
- temp.update ("Required", strRequired);
- temp.update ("DefaultValue", strDefaultValue);
- resDescription = temp.encode ();
- }
- ConfigInfo::~ConfigInfo ()
- {
- }
- void ConfigInfo::SetList (const char* str)
- {
- ResDataObject temp;
- temp.decode (resDescription.c_str ());
- temp.update ("List", str);
- resDescription = temp.encode ();
- }
- void ConfigInfo::SetRange (const char* strmin, const char* strmax)
- {
- ResDataObject temp;
- temp.decode (resDescription.c_str ());
- temp.update ("RangeMin", strmin);
- temp.update ("RangeMax", strmax);
- resDescription = temp.encode ();
- }
- const char* ConfigInfo::GetDescription ()
- {
- return resDescription.c_str ();
- }
- const char* ConfigInfo::GetCurrentValue ()
- {
- return resValue.c_str ();
- }
- void ConfigInfo::SetCurrentValue (const char* res)
- {
- resValue = res;
- }
- const char* ConfigInfo::GetKey ()
- {
- return strConfKey.c_str ();
- }
|