headers/bsd: Add sys/queue.h.
[haiku.git] / src / kits / debugger / value / value_formatters / BoolValueFormatter.cpp
blob8c658eb9dcfcce7943d594065294ce4eff5c5fde
1 /*
2 * Copyright 2015, Rene Gollent, rene@gollent.com.
3 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
4 * Distributed under the terms of the MIT License.
5 */
6 #include "BoolValueFormatter.h"
8 #include "BoolValue.h"
11 BoolValueFormatter::BoolValueFormatter()
13 ValueFormatter()
18 BoolValueFormatter::~BoolValueFormatter()
23 status_t
24 BoolValueFormatter::FormatValue(Value* _value, BString& _output)
26 BoolValue* value = dynamic_cast<BoolValue*>(_value);
27 if (value == NULL)
28 return B_BAD_VALUE;
30 _output.SetTo(value->GetValue() ? "true" : "false");
32 return B_OK;