1 #ifndef DALI_TOOLKIT_INTERNAL_BUILDER_IMPL_DEBUG_H
2 #define DALI_TOOLKIT_INTERNAL_BUILDER_IMPL_DEBUG_H
5 * Copyright (c) 2016 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
20 #include <dali/integration-api/debug.h>
21 #include <dali-toolkit/devel-api/builder/json-parser.h>
23 #if defined( DEBUG_ENABLED )
32 #define DUMP_PARSE_TREE(parser) LogTree(parser)
33 #define DUMP_TEST_MAPPINGS(parser) \
34 OptionalChild mappings = IsChild( parser.GetRoot(), KEYNAME_MAPPINGS ); \
37 std::ostringstream oss; \
38 oss << "Mappings: {" << std::endl; \
39 for( TreeNode::ConstIterator iter = (*mappings).CBegin(); iter != (*mappings).CEnd(); ++iter ) \
41 Property::Value value; \
42 bool converted = GetPropertyMap(*mappings, (*iter).first, Property::NONE, value ); \
45 oss << " " << (*iter).first << ":" << value << std::endl; \
48 oss << "}" << std::endl; \
49 DALI_LOG_INFO( gFilterScript, Debug::Verbose, oss.str().c_str() ); \
53 void LogTree( const Toolkit::JsonParser& mParser );
55 std::string PropertyValueToString( const Property::Value& value );
64 #define DUMP_PARSE_TREE(parser)
65 #define DUMP_TEST_MAPPINGS(parser)
67 #endif // DEBUG_ENABLED
68 #endif // DALI_TOOLKIT_INTERNAL_BUILDER_IMPL_DEBUG_H