No longer using std::unary_function<>.
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / builder / tree-node-manipulator.h
index 3b39e37..eaea13e 100644 (file)
@@ -1,38 +1,41 @@
-#ifndef __DALI_SCRIPT_TREE_NODE_MANIPULATOR_H__
-#define __DALI_SCRIPT_TREE_NODE_MANIPULATOR_H__
-
-//
-// Copyright (c) 2014 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Flora License, Version 1.0 (the License);
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://floralicense.org/license/
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an AS IS BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
+#ifndef DALI_SCRIPT_TREE_NODE_MANIPULATOR_H
+#define DALI_SCRIPT_TREE_NODE_MANIPULATOR_H
 
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// EXTERNAL INCLUDES
 #include <utility> // pair
 #include <iterator>
-#include <vector>
 #include <cstring>
 
+#include <dali-toolkit/public-api/dali-toolkit-common.h>
+#include <dali/public-api/common/vector-wrapper.h>
+
 // INTERNAL INCLUDES
-#include <dali/public-api/common/dali-common.h>
-#include <dali-toolkit/public-api/builder/tree-node.h>
+#include <dali-toolkit/devel-api/builder/tree-node.h>
 
-namespace Dali DALI_IMPORT_API
+namespace Dali
 {
 
 namespace Toolkit
 {
 
-namespace Internal DALI_INTERNAL
+namespace Internal
 {
 typedef std::vector<char> VectorChar;
 typedef VectorChar::iterator VectorCharIter;
@@ -188,21 +191,21 @@ private:
   /*
    * Do write to string stream
    */
-  void DoWrite(const TreeNode *value, std::ostream& output, int ident) const;
+  void DoWrite(const TreeNode *value, std::ostream& output, int level, int ident, bool groupChildren) const;
 
 };
 
 /*
  * Collect nodes
  */
-struct CollectNodes : public std::unary_function<TreeNode*, void>
+struct CollectNodes
 {
   CollectNodes() {};
 
   /*
    * Call operator to add nodes to the list
    */
-  result_type operator()(argument_type& n)
+  void operator()(TreeNode*& n)
   {
     DALI_ASSERT_DEBUG(n && "Operation on NULL JSON node");
     nodes.push_back(n);
@@ -257,4 +260,4 @@ char *CopyString( const char *fromString, VectorCharIter& iter, const VectorChar
 
 } // namespace Dali
 
-#endif // __DALI_SCRIPT_TREE_NODE_MANIPULATOR_H__
+#endif // DALI_SCRIPT_TREE_NODE_MANIPULATOR_H