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_ADC_CMDS_HXX
25 #define ADC_ADC_CMDS_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 /** A command that produces HTML output from the Autodoc Repository.
42 */
43 class CreateHtml : public Command
44 {
45   public:
46                         CreateHtml();
47                         ~CreateHtml();
48 
49     const String &      OutputDir() const;
DevelopersManual_HtmlRoot() const50     const String &      DevelopersManual_HtmlRoot() const
51                                                 { return sDevelopersManual_HtmlRoot; }
52 
53   private:
54     // Interface Context:
55     virtual void        do_Init(
56                             opt_iter &          i_nCurArgsBegin,
57                             opt_iter            i_nEndOfAllArgs );
58     // Interface Command:
59     virtual bool        do_Run() const;
60     virtual int         inq_RunningRank() const;
61 
62     // Locals
63     void                run_Cpp() const;
64     void                run_Idl() const;
65 
66     // DATA
67     String              sOutputRootDirectory;
68     String              sDevelopersManual_HtmlRoot;
69 };
70 
71 inline const String &
OutputDir() const72 CreateHtml::OutputDir() const
73     { return sOutputRootDirectory; }
74 
75 
76 extern const String C_opt_Verbose;
77 
78 extern const String C_opt_Parse;
79 extern const String C_opt_Name;
80 extern const String C_opt_LangAll;
81 extern const String C_opt_ExtensionsAll;
82 extern const String C_opt_DevmanFile;
83 extern const String C_opt_SinceFile;
84 
85 extern const String C_arg_Cplusplus;
86 extern const String C_arg_Idl;
87 extern const String C_arg_Java;
88 
89 extern const String C_opt_Project;
90 //extern const String C_opt_Lang;
91 //extern const String C_opt_Extensions;
92 extern const String C_opt_SourceTree;
93 extern const String C_opt_SourceDir;
94 extern const String C_opt_SourceFile;
95 
96 extern const String C_opt_CreateHtml;
97 extern const String C_opt_DevmanRoot;
98 
99 //extern const String C_opt_CreateXml;
100 //extern const String C_opt_Load;
101 //extern const String C_opt_Save;
102 
103 extern const String C_opt_IgnoreDefine;
104 extern const String C_opt_ExternNamespace;
105 extern const String C_opt_ExternRoot;
106 
107 
108 inline void
CHECKOPT(bool b,const char * miss,const String & opt)109 CHECKOPT( bool b, const char * miss, const String & opt )
110 {
111     if ( NOT b )
112     {
113         StreamLock slMsg(100);
114         throw X_CommandLine( slMsg() << "Missing " << miss <<" after " << opt << "." << c_str );
115     }
116 }
117 
118 }   // namespace command
119 }   // namespace autodoc
120 
121 
122 #endif
123