2 #include "ScopeValue.h"
11 Set( (str == L
"true") );
16 void ScopeValue<Uint16Range>::SetFromString(
const std::wstring& str) {
17 Set(Uint16Range(str));
22 void ScopeValue<ScannerType>::SetFromString(
const std::wstring& str) {
23 Set(ScannerType(str));
28 void ScopeValue<ScannerVectorType>::SetFromString(
const std::wstring& str) {
29 Set(ScannerVectorType(str));
34 void ScopeValue<RunState>::SetFromString(
const std::wstring& str) {
40 void ScopeValue<ZDevice>::SetFromString(
const std::wstring& str) {
46 void ScopeValue<BehaviorMode>::SetFromString(
const std::wstring& str) {
47 Set(BehaviorMode(str));
52 void ScopeValue<DaqMode>::SetFromString(
const std::wstring& str) {
58 void ScopeValue<DaqTiming>::SetFromString(
const std::wstring& str) {
64 void ScopeValue<DaqSampling>::SetFromString(
const std::wstring& str) {
65 Set(DaqSampling(str));
72 Set( !(std::wstringstream(str) >> tmp) ? 0.0 : tmp );
79 Set( !(std::wstringstream(str) >> tmp) ? 0 : tmp );
84 void ScopeValue<uint16_t>::SetFromString(
const std::wstring& str) {
86 Set( !(std::wstringstream(str) >> tmp) ? 0 : tmp );
91 void ScopeValue<int32_t>::SetFromString(
const std::wstring& str) {
93 Set( !(std::wstringstream(str) >> tmp) ? 0 : tmp );
100 Set( !(std::wstringstream(str) >> tmp) ? 0 : tmp );
105 void ScopeValue<uint64_t>::SetFromString(
const std::wstring& str) {
107 Set( !(std::wstringstream(str) >> tmp) ? 0 : tmp );
121 return (Value())?L
"true":L
"false";
126 std::wstring ScopeValue<Uint16Range>::ToChar()
const {
127 return Value().operator std::wstring();
132 std::wstring ScopeValue<ScannerType>::ToChar()
const {
133 return Value().operator std::wstring();
138 std::wstring ScopeValue<ScannerVectorType>::ToChar()
const {
139 return Value().operator std::wstring();
144 std::wstring ScopeValue<RunState>::ToChar()
const {
145 return Value().operator std::wstring();
150 std::wstring ScopeValue<ZDevice>::ToChar()
const {
151 return Value().operator std::wstring();
156 std::wstring ScopeValue<BehaviorMode>::ToChar()
const {
157 return Value().operator std::wstring();
162 std::wstring ScopeValue<DaqMode>::ToChar()
const {
163 return Value().operator std::wstring();
168 std::wstring ScopeValue<DaqSampling>::ToChar()
const {
169 return Value().operator std::wstring();
174 std::wstring ScopeValue<DaqTiming>::ToChar()
const {
175 return Value().operator std::wstring();
181 std::wstringstream stream;
189 std::wstringstream stream;
196 std::wstring ScopeValue<uint16_t>::ToChar()
const {
197 std::wstringstream stream;
204 std::wstring ScopeValue<int32_t>::ToChar()
const {
205 std::wstringstream stream;
213 std::wstringstream stream;
220 std::wstring ScopeValue<uint64_t>::ToChar()
const {
221 std::wstringstream stream;
This is the include file for standard system include files, or project specific include files that ar...
std::wstring ToChar() const
Converts value into a wstring.
void SetFromString(const std::wstring &str)
Parses a wstring and sets the value accordingly.