1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef ADC_CMD_SINCEDATA_HXX
29 #define ADC_CMD_SINCEDATA_HXX
30 
31 
32 
33 // USED SERVICES
34 	// BASE CLASSES
35 #include "adc_cmd.hxx"
36 	// COMPONENTS
37 	// PARAMETERS
38 
39 namespace autodoc
40 {
41 namespace command
42 {
43 
44 
45 /** Provides replacements for the contents of the @@since documentation tag.
46 
47     Because the @@since tag is part of the source code, it allows only one kind
48     of version information there. If this is to be mapped for different products
49     (example: from OpenOffice.org versions in the @@since tag to StarOffice or
50     StarSuite products), the value of @@since needs a replacement, which is provided
51     by this class.
52 
53 */
54 class SinceTagTransformationData : public Context
55 {
56   public:
57     /** The key of this map are the version numbers within @since.
58         The value is the string to display for each version number.
59     */
60     typedef std::map<String,String>     Map_Version2Display;
61 
62     // LIFECYCLE
63                         SinceTagTransformationData();
64     virtual             ~SinceTagTransformationData();
65 
66     // INQUIRY
67     /// False, if no transformation table exists.
68     bool                DoesTransform() const;
69 
70     /** Gets the string to display for a version number.
71 
72         @param i_sVersionNumber
73         Usually should be the result of ->StripSinceTagValue().
74     */
75     const String &      DisplayOf(
76                             const String &      i_sVersionNumber ) const;
77   private:
78     // Interface Context:
79     virtual void        do_Init(
80                             opt_iter &          i_nCurArgsBegin,
81                             opt_iter            i_nEndOfAllArgs );
82     // DATA
83     Map_Version2Display aTransformationTable;
84 };
85 
86 
87 }   // namespace command
88 }   // namespace autodoc
89 
90 
91 #endif
92