X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Fpublic-api%2Fbuilder%2Fjson-parser.h;h=7f47be3accfad8d45c1687e6889d5e70ef0c1df9;hb=47602d95266454026fab0b4fb9c745a1c342c5c3;hp=a47ea63f1ed4a29488ea3b36175234c85e5535e7;hpb=e2eda444afbe82e9591fe198eef339227f90a616;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/public-api/builder/json-parser.h b/dali-toolkit/public-api/builder/json-parser.h deleted file mode 100644 index a47ea63..0000000 --- a/dali-toolkit/public-api/builder/json-parser.h +++ /dev/null @@ -1,146 +0,0 @@ -#ifndef __DALI_JSON_PARSER_H__ -#define __DALI_JSON_PARSER_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. -// - -#include -#include -#include -#include - -// INTERNAL INCLUDES -#include -#include - -namespace Dali DALI_IMPORT_API -{ - -namespace Toolkit -{ - -namespace Internal DALI_INTERNAL -{ -class JsonParser; -} - -/* - * Parses JSON - */ -class JsonParser : public BaseHandle -{ -public: - - /* - * Create new parser - * @return JsonParser - */ - static JsonParser New(); - - /* - * Create new parser from the given tree - * This method will deep copy the given tree. - * @return JsonParser - */ - static JsonParser New(const TreeNode& tree); - - /* - * Create empty handle - */ - JsonParser(); - - /* - * virtual Destructor - */ - virtual ~JsonParser(); - - /** - * Downcast an Object handle to JsonParser if it is a JsonParser. - * @param[in] handle Handle to an object - * @return A handle to a JsonParser or an uninitialized handle - */ - static JsonParser DownCast( BaseHandle handle ); - - /* - * Parse the source and construct a node tree. - * Subsequent calls to this function will merge the trees. - * @param source The json source to parse - * @return zero if parsed okay, otherwise an error. - */ - int Parse(const std::string& source); - - /* - * Optimize memory usage by packing strings - */ - void Pack(void); - - /* - * Get the tree root node - */ - const TreeNode* GetRoot() const; - - /* - * Get the parser error flag - * @return true if there was a parse error - */ - bool ParseError() const; - - /* - * Get the last error position - * @return The character position of the most recent Parse() error - */ - int GetErrorPosition() const; - - /* - * Get the last error description - * @return A string description of the error - */ - std::string GetErrorDescription() const; - - /* - * Get the last error line number - * @return the line number of the most recent Parse() error. - */ - int GetErrorLineNumber() const; - - /* - * Get the last error line number - * @return the line number of the most recent Parse() error. - */ - int GetErrorColumn() const; - - /* - * Write to output stream with optional indent - * @param output The stream to write to - * @param indent The indent to use - */ - void Write(std::ostream& output, int indent) const; - -public: // Not intended for application developers - - /** - * This constructor is used by Dali New() methods - * @param [in] parser A pointer to a newly allocated Dali resource - */ - explicit DALI_INTERNAL JsonParser(Internal::JsonParser* parser); -}; - -} // namespace Toolkit - -} // namespace Dali - - -#endif // __DALI_JSON_PARSER_H__