1/*
2 * Copyright 2010, Rene Gollent, rene@gollent.com.
3 * Distributed under the terms of the MIT License.
4 */
5
6
7#include "StringValue.h"
8
9#include <stdio.h>
10
11
12StringValue::StringValue(const char* value)
13	:
14	fValue(value)
15{
16}
17
18
19StringValue::~StringValue()
20{
21}
22
23
24bool
25StringValue::ToString(BString& _string) const
26{
27	_string = fValue;
28	return true;
29}
30
31
32bool
33StringValue::ToVariant(BVariant& _value) const
34{
35	_value = fValue.String();
36	return true;
37}
38
39
40bool
41StringValue::operator==(const Value& other) const
42{
43	const StringValue* otherString = dynamic_cast<const StringValue*>(&other);
44	return otherString != NULL ? fValue == otherString->fValue : false;
45}
46