projects
/
platform
/
core
/
uifw
/
dali-toolkit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improved visual base property registration speed
[platform/core/uifw/dali-toolkit.git]
/
dali-toolkit
/
internal
/
builder
/
json-parser-impl.h
diff --git
a/dali-toolkit/internal/builder/json-parser-impl.h
b/dali-toolkit/internal/builder/json-parser-impl.h
index
987799e
..
58c2ce0
100644
(file)
--- a/
dali-toolkit/internal/builder/json-parser-impl.h
+++ b/
dali-toolkit/internal/builder/json-parser-impl.h
@@
-1,8
+1,8
@@
-#ifndef
__DALI_JSON_PARSER_IMPL_H__
-#define
__DALI_JSON_PARSER_IMPL_H__
+#ifndef
DALI_JSON_PARSER_IMPL_H
+#define
DALI_JSON_PARSER_IMPL_H
/*
/*
- * Copyright (c) 20
14
Samsung Electronics Co., Ltd.
+ * Copyright (c) 20
21
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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-18,26
+18,24
@@
*
*/
*
*/
-#include <string>
-#include <vector>
+// EXTERNAL INCLUDES
+#include <dali/public-api/common/vector-wrapper.h>
+#include <dali/public-api/object/base-object.h>
#include <list>
#include <list>
+#include <string>
-//
-#include <dali/public-api/object/base-object.h>
-#include <dali-toolkit/public-api/builder/json-parser.h>
-#include <dali-toolkit/public-api/builder/tree-node.h>
+// INTERNAL INCLUDES
+#include <dali-toolkit/devel-api/builder/json-parser.h>
+#include <dali-toolkit/devel-api/builder/tree-node.h>
#include <dali-toolkit/internal/builder/builder-get-is.inl.h>
namespace Dali
{
#include <dali-toolkit/internal/builder/builder-get-is.inl.h>
namespace Dali
{
-
namespace Toolkit
{
namespace Toolkit
{
-
namespace Internal
{
namespace Internal
{
-
/*
* Parses JSON
*/
/*
* Parses JSON
*/
@@
-56,12
+54,12
@@
public:
/*
*/
/*
*/
- ~JsonParser();
+ ~JsonParser()
override
;
/*
* @copydoc Toolkit::JsonParser::Parse()
*/
/*
* @copydoc Toolkit::JsonParser::Parse()
*/
-
int
Parse(const std::string& source);
+
bool
Parse(const std::string& source);
/*
* @copydoc Toolkit::JsonParser::Pack()
/*
* @copydoc Toolkit::JsonParser::Pack()
@@
-104,45
+102,42
@@
public:
void Write(std::ostream& output, int indent) const;
private:
void Write(std::ostream& output, int indent) const;
private:
- typedef std::vector<char> VectorChar;
+ typedef std::vector<char>
VectorChar;
typedef VectorChar::iterator VectorCharIter;
typedef VectorChar::iterator VectorCharIter;
- typedef std::list<VectorChar> SourceContainer;
+ typedef std::list<VectorChar>
SourceContainer;
typedef std::list<VectorChar>::iterator SourceContainerIter;
typedef std::list<VectorChar>::iterator SourceContainerIter;
- JsonParser(JsonParser
&);
+ JsonParser(JsonParser&);
JsonParser& operator=(const JsonParser&);
JsonParser& operator=(const JsonParser&);
- SourceContainer mSources; ///< List of strings from Parse() merge operations
-
- TreeNode* mRoot; ///< Tree root
+ SourceContainer mSources; ///< List of strings from Parse() merge operations
- const char *mErrorDescription; ///< Last parse error description
- int mErrorPosition; ///< Last parse error position
- int mErrorLine; ///< Last parse error line
- int mErrorColumn; ///< Last parse error column
+ TreeNode* mRoot; ///< Tree root
- int mNumberOfChars; ///< The size of string data for all nodes
- int mNumberOfNodes; ///< Node count
+ const char* mErrorDescription; ///< Last parse error description
+ int mErrorPosition; ///< Last parse error position
+ int mErrorLine; ///< Last parse error line
+ int mErrorColumn; ///< Last parse error column
+ int mNumberOfChars; ///< The size of string data for all nodes
+ int mNumberOfNodes; ///< Node count
};
} // namespace Internal
};
} // namespace Internal
-
inline const Internal::JsonParser& GetImplementation(const Toolkit::JsonParser& parser)
{
inline const Internal::JsonParser& GetImplementation(const Toolkit::JsonParser& parser)
{
- DALI_ASSERT_ALWAYS(
parser && "JsonParser handle is empty"
);
+ DALI_ASSERT_ALWAYS(
parser && "JsonParser handle is empty"
);
const BaseObject& handle = parser.GetBaseObject();
return static_cast<const Internal::JsonParser&>(handle);
}
const BaseObject& handle = parser.GetBaseObject();
return static_cast<const Internal::JsonParser&>(handle);
}
-
inline Internal::JsonParser& GetImplementation(Toolkit::JsonParser& parser)
{
inline Internal::JsonParser& GetImplementation(Toolkit::JsonParser& parser)
{
- DALI_ASSERT_ALWAYS(
parser && "JsonParser handle is empty"
);
+ DALI_ASSERT_ALWAYS(
parser && "JsonParser handle is empty"
);
BaseObject& handle = parser.GetBaseObject();
BaseObject& handle = parser.GetBaseObject();
@@
-153,5
+148,4
@@
inline Internal::JsonParser& GetImplementation(Toolkit::JsonParser& parser)
} // namespace Dali
} // namespace Dali
-
-#endif // __DALI_JSON_PARSER_IMPL_H__
+#endif // DALI_JSON_PARSER_IMPL_H