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_DISPLAY_HTML_OUTFILE_HXX
25 #define ADC_DISPLAY_HTML_OUTFILE_HXX
26 
27 // USED SERVICES
28 #include <udm/html/htmlitem.hxx>
29 #include <cosv/ploc.hxx>
30 
31 
32 namespace csv
33 {
34     class File;
35 }
36 
37 
38 
39 
40 class HtmlDocuFile
41 {
42   public:
43 	// LIFECYCLE
44 						HtmlDocuFile();
45 
46 	void				SetLocation(
47 							const csv::ploc::Path &
48                                                 i_rFilePath,
49                             uintt               i_depthInOutputTree );
50     void                SetTitle(
51                             const char *        i_sTitle );
52     void                SetCopyright(
53                             const char *        i_sCopyright );
54     void                EmptyBody();
55 
Body()56 	Html::Body &  		Body()					{ return aBodyData; }
57 	bool          		CreateFile();
58 
59     static void         WriteCssFile(
60 							const csv::ploc::Path &
61                                                 i_rFilePath );
62   private:
63 	void	 			WriteHeader(
64 							csv::File &			io_aFile );
65 	void				WriteBody(
66 							csv::File &			io_aFile );
67 
68 	// DATA
69 	String 				sFilePath;
70 	String  			sTitle;
71 	String  			sLocation;
72     String              sCopyright;
73     uintt               nDepthInOutputTree;
74 
75 	Html::Body			aBodyData;
76 	StreamStr           aBuffer;                // Output buffer, should be transfered into csv::File.
77 };
78 
79 
80 
81 
82 #endif
83