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 #ifndef ADC_CMD_SINCEDATA_HXX 25 #define ADC_CMD_SINCEDATA_HXX 26 27 28 29 // USED SERVICES 30 // BASE CLASSES 31 #include "adc_cmd.hxx" 32 // COMPONENTS 33 // PARAMETERS 34 35 namespace autodoc 36 { 37 namespace command 38 { 39 40 41 /** Provides replacements for the contents of the @@since documentation tag. 42 43 Because the @@since tag is part of the source code, it allows only one kind 44 of version information there. If this is to be mapped for different products 45 (example: from OpenOffice.org versions in the @@since tag to StarOffice or 46 StarSuite products), the value of @@since needs a replacement, which is provided 47 by this class. 48 49 */ 50 class SinceTagTransformationData : public Context 51 { 52 public: 53 /** The key of this map are the version numbers within @since. 54 The value is the string to display for each version number. 55 */ 56 typedef std::map<String,String> Map_Version2Display; 57 58 // LIFECYCLE 59 SinceTagTransformationData(); 60 virtual ~SinceTagTransformationData(); 61 62 // INQUIRY 63 /// False, if no transformation table exists. 64 bool DoesTransform() const; 65 66 /** Gets the string to display for a version number. 67 68 @param i_sVersionNumber 69 Usually should be the result of ->StripSinceTagValue(). 70 */ 71 const String & DisplayOf( 72 const String & i_sVersionNumber ) const; 73 private: 74 // Interface Context: 75 virtual void do_Init( 76 opt_iter & i_nCurArgsBegin, 77 opt_iter i_nEndOfAllArgs ); 78 // DATA 79 Map_Version2Display aTransformationTable; 80 }; 81 82 83 } // namespace command 84 } // namespace autodoc 85 86 87 #endif 88