1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 // MARKER(update_precomp.py): autogen include statement, do not remove 25 #include "precompiled_shell.hxx" 26 #include "keywordstag.hxx" 27 28 /*********************** CKeywordsTag ***********************/ 29 startTag()30void CKeywordsTag::startTag() 31 { 32 m_sCurrentKeyword.clear(); 33 } 34 endTag()35void CKeywordsTag::endTag() 36 { 37 m_slKeywords.push_back(m_sCurrentKeyword); 38 } 39 addCharacters(const std::wstring & characters)40void CKeywordsTag::addCharacters(const std::wstring& characters) 41 { 42 m_sCurrentKeyword += characters; 43 } 44 addAttributes(const XmlTagAttributes_t &)45void CKeywordsTag::addAttributes(const XmlTagAttributes_t& /*attributes*/) 46 { 47 // there are no attributes for keywords 48 } 49 getTagContent()50std::wstring CKeywordsTag::getTagContent( ) 51 { 52 StringList_t::const_iterator keywords_Iter= m_slKeywords.begin( ); 53 StringList_t::const_iterator keywords_Iter_end = m_slKeywords.end( ); 54 55 std::wstring ret_KeyWord_String = ( keywords_Iter != keywords_Iter_end) ? *keywords_Iter++ : L""; 56 for ( ; keywords_Iter != keywords_Iter_end; ++keywords_Iter) 57 ret_KeyWord_String += L"," + *keywords_Iter; 58 return ret_KeyWord_String; 59 } 60 61