1 #ifndef __DALI_TOOLKIT_TEXT_MARKUP_PROCESSOR_HELPER_FUNCTIONS_H__
2 #define __DALI_TOOLKIT_TEXT_MARKUP_PROCESSOR_HELPER_FUNCTIONS_H__
5 * Copyright (c) 2015 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.
22 #include <dali/public-api/common/dali-vector.h>
26 #include <dali-toolkit/internal/text/text-definitions.h>
38 * @brief Stores an attribute pair: name, value.
42 const char* nameBuffer;
43 const char* valueBuffer;
49 * @brief Stores a tag and its attributes.
53 Vector<Attribute> attributes;
60 * @brief Compare if two tokens are equal.
62 * @pre @p string1 must be lower case. (The html-ish constant tokens)
63 * The @p stringBuffer2 parameter is transformed to lower case.
64 * This function is used in the mark-up parser.
65 * It has no sense to transform the constants html-ish tokens to lower case when
66 * it's known they already are.
68 * @param[in] string1 The html-ish constant token.
69 * @param[in] stringBuffer2 Pointer to the html-ish token buffer.
70 * @param[in] length The length of the html-ish token.
72 * @return @e true if both strings are equal.
74 bool TokenComparison( const std::string& string1, const char* const stringBuffer2, Length length );
77 * @brief Skips any unnecessary white space.
79 * @param[in,out] markupStringBuffer The mark-up string buffer. It's a const iterator pointing the current character.
80 * @param[in] markupStringEndBuffer Pointer to one character after the end of the mark-up string buffer.
82 void SkipWhiteSpace( const char*& markupStringBuffer,
83 const char* const markupStringEndBuffer );
87 } // namespace Toolkit
91 #endif // __DALI_TOOLKIT_TEXT_MARKUP_PROCESSOR_HELPER_FUNCTIONS_H__