1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: adc_cl.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef ADC_ADC_CL_HXX
32 #define ADC_ADC_CL_HXX
38 #include <cosv/comdline.hxx>
53 class SinceTagTransformationData
;
57 /** Reads and runs an Autodoc command line.
59 class CommandLine
: public csv::CommandLine_Ifc
70 bool DebugStyle_ShowText() const;
71 bool DebugStyle_ShowStoredObjects() const;
72 bool DebugStyle_ShowTokens() const;
75 bool DoesTransform_SinceTag() const;
77 // /// @see command::SinceTagTransformationData::StripSinceTagValue()
78 // bool Strip_SinceTagText(
79 // String & io_sSinceTagValue ) const;
81 /// @see command::SinceTagTransformationData::DisplayOf()
82 const String
& DisplayOf_SinceTagValue(
83 const String
& i_sVersionNumber
) const;
86 const String
& ExternRoot() const { return sExternRoot
; }
87 const String
& ExternNamespace() const { return sExternNamespace
; }
89 bool CppUsed() const { return bCpp
; }
90 bool IdlUsed() const { return bIdl
; }
97 { sExternRoot
= i_s
; }
98 void Set_ExternNamespace(
100 { sExternNamespace
= i_s
; }
101 ary::Repository
& TheRepository() const { csv_assert(pReposy
!= 0);
103 void Set_CppUsed() { bCpp
= true; }
104 void Set_IdlUsed() { bIdl
= true; }
107 // Interface cosv::CommandLine_Ifc:
108 virtual void do_Init(
111 virtual void do_PrintUse() const;
112 virtual bool inq_CheckParameters() const;
115 typedef StringVector::const_iterator opt_iter
;
116 typedef std::vector
< DYN
command::Command
* > CommandList
;
118 void load_IncludedCommands(
120 const char * i_filePath
);
128 void do_clCreateHtml(
135 // void do_clCreateXml(
145 void sort_Commands();
149 Dyn
<command::SinceTagTransformationData
>
152 CommandList aCommands
;
154 command::CreateHtml
*
158 String sExternNamespace
;
160 mutable Dyn
<ary::Repository
>
173 CommandLine::DebugStyle_ShowText() const
174 { return (nDebugStyle
& 2) != 0; }
176 CommandLine::DebugStyle_ShowStoredObjects() const
177 { return (nDebugStyle
& 4) != 0; }
179 CommandLine::DebugStyle_ShowTokens() const
180 { return (nDebugStyle
& 1) != 0; }
182 } // namespace autodoc
187 { return autodoc::CommandLine::Get_().DebugStyle_ShowText(); }
190 { return autodoc::CommandLine::Get_().DebugStyle_ShowStoredObjects(); }
193 { return autodoc::CommandLine::Get_().DebugStyle_ShowTokens(); }