buffet: GCD command defintion. Compound object type support.
Added support for "object" type. Refactored parameter validation
to make sure we have object schema context when we validate
a value of parameter.
Parameter |schema| was used in two different contexts, as both
a base parameter definition and as a custom object definition.
Renamed the former to be 'base_schema' and latter as
'object_schema' to remove the confusion.
Extracted common data type manipulation functions into
schema_utils.cc/.h files.
BUG=chromium:374860
TEST=All unit tests pass.
Change-Id: I6c3549849a258bcc94b3d754acd14e072438d140
Reviewed-on: https://chromium-review.googlesource.com/204793
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Reviewed-by: Christopher Wiley <wiley@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
diff --git a/buffet/commands/prop_values.cc b/buffet/commands/prop_values.cc
index e2eabc0..0c98a20 100644
--- a/buffet/commands/prop_values.cc
+++ b/buffet/commands/prop_values.cc
@@ -2,22 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+// TODO(avakulenko) Remove this file by Aug 1, 2014 if nothing ends up here...
+
#include "buffet/commands/prop_values.h"
-#include <memory>
-
-#include <base/values.h>
-
-#include "buffet/commands/prop_types.h"
-
namespace buffet {
-// Specializations of generic GetValueType<T>() for supported C++ types.
-template<> ValueType GetValueType<int>() { return ValueType::Int; }
-template<> ValueType GetValueType<double>() { return ValueType::Double; }
-template<> ValueType GetValueType<std::string>() { return ValueType::String; }
-template<> ValueType GetValueType<bool>() { return ValueType::Boolean; }
-
-PropValue::~PropValue() {}
} // namespace buffet