fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / autodoc / source / inc / adc_cl.hxx
blob67db5e3ba24b58239b8f84594d1841fa7e17ba29
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef ADC_ADC_CL_HXX
21 #define ADC_ADC_CL_HXX
25 // USED SERVICES
26 // BASE CLASSES
27 #include <cosv/comdline.hxx>
28 // COMPONENTS
29 // PARAMETERS
31 namespace ary
33 class Repository;
36 namespace autodoc
38 namespace command
40 class Command;
41 class CreateHtml;
42 class SinceTagTransformationData;
46 /** Reads and runs an Autodoc command line.
48 class CommandLine : public csv::CommandLine_Ifc
50 public:
51 // LIFECYCLE
52 CommandLine();
53 ~CommandLine();
54 // OPERATIONS
55 int Run() const;
57 // INQUIRY
58 // debugging
59 bool DebugStyle_ShowText() const;
60 bool DebugStyle_ShowStoredObjects() const;
61 bool DebugStyle_ShowTokens() const;
63 // @since tags
64 bool DoesTransform_SinceTag() const;
66 // /// @see command::SinceTagTransformationData::StripSinceTagValue()
67 // bool Strip_SinceTagText(
68 // String & io_sSinceTagValue ) const;
70 /// @see command::SinceTagTransformationData::DisplayOf()
71 const String & DisplayOf_SinceTagValue(
72 const String & i_sVersionNumber ) const;
74 // extern IDL links
75 const String & ExternRoot() const { return sExternRoot; }
76 const String & ExternNamespace() const { return sExternNamespace; }
78 bool IdlUsed() const { return bIdl; }
80 // ACCESS
81 static CommandLine &
82 Get_();
83 void Set_ExternRoot(
84 const String & i_s )
85 { sExternRoot = i_s; }
86 void Set_ExternNamespace(
87 const String & i_s )
88 { sExternNamespace = i_s; }
89 ary::Repository & TheRepository() const { csv_assert(pReposy != 0);
90 return *pReposy; }
91 void Set_IdlUsed() { bIdl = true; }
93 private:
94 // Interface cosv::CommandLine_Ifc:
95 virtual void do_Init(
96 int argc,
97 char * argv[] );
98 virtual void do_PrintUse() const;
99 virtual bool inq_CheckParameters() const;
101 // Locals
102 typedef StringVector::const_iterator opt_iter;
103 typedef std::vector< DYN command::Command* > CommandList;
105 void load_IncludedCommands(
106 StringVector & out,
107 const char * i_filePath );
109 void do_clVerbose(
110 opt_iter & it,
111 opt_iter itEnd );
112 void do_clParse(
113 opt_iter & it,
114 opt_iter itEnd );
115 void do_clCreateHtml(
116 opt_iter & it,
117 opt_iter itEnd );
118 void do_clSinceFile(
119 opt_iter & it,
120 opt_iter itEnd );
122 // void do_clCreateXml(
123 // opt_iter & it,
124 // opt_iter itEnd );
125 // void do_clLoad(
126 // opt_iter & it,
127 // opt_iter itEnd );
128 // void do_clSave(
129 // opt_iter & it,
130 // opt_iter itEnd );
132 void sort_Commands();
134 // DATA
135 uintt nDebugStyle;
136 Dyn<command::SinceTagTransformationData>
137 pSinceTransformator;
139 CommandList aCommands;
140 bool bInitOk;
141 command::CreateHtml *
142 pCommand_CreateHtml;
144 String sExternRoot;
145 String sExternNamespace;
147 mutable Dyn<ary::Repository>
148 pReposy;
149 bool bIdl;
151 static CommandLine *
152 pTheInstance_;
157 // IMPLEMENTATION
158 inline bool
159 CommandLine::DebugStyle_ShowText() const
160 { return (nDebugStyle & 2) != 0; }
161 inline bool
162 CommandLine::DebugStyle_ShowStoredObjects() const
163 { return (nDebugStyle & 4) != 0; }
164 inline bool
165 CommandLine::DebugStyle_ShowTokens() const
166 { return (nDebugStyle & 1) != 0; }
168 } // namespace autodoc
171 inline bool
172 DEBUG_ShowText()
173 { return autodoc::CommandLine::Get_().DebugStyle_ShowText(); }
174 inline bool
175 DEBUG_ShowStoring()
176 { return autodoc::CommandLine::Get_().DebugStyle_ShowStoredObjects(); }
177 inline bool
178 DEBUG_ShowTokens()
179 { return autodoc::CommandLine::Get_().DebugStyle_ShowTokens(); }
181 #endif
183 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */