equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef WRITERBASE_H |
|
19 #define WRITERBASE_H |
|
20 |
|
21 #include "layout.h" |
|
22 |
|
23 /** |
|
24 * TWriterBase |
|
25 * Base class for layout writers |
|
26 */ |
|
27 class TWriterBase |
|
28 { |
|
29 public: |
|
30 TWriterBase(const std::string& aName); |
|
31 virtual ~TWriterBase(); |
|
32 virtual void Write(const std::string& aLayName) = 0; |
|
33 protected: |
|
34 string iName; |
|
35 }; |
|
36 |
|
37 class TLayWriterBase : public TWriterBase |
|
38 { |
|
39 public: |
|
40 TLayWriterBase(TLayout& aLayout, const std::string& aName); |
|
41 virtual ~TLayWriterBase(); |
|
42 virtual void Write(const std::string& aLayName) = 0; |
|
43 protected: |
|
44 TLayout& iLayout; |
|
45 }; |
|
46 |
|
47 template <class T> |
|
48 class TMLWriterBase : public TWriterBase |
|
49 { |
|
50 public: |
|
51 TMLWriterBase(T& aLayout, const std::string& aName) : TWriterBase(aName), iLayout(aLayout) {}; |
|
52 virtual ~TMLWriterBase() {}; |
|
53 virtual void Write(const std::string& aLayName) = 0; |
|
54 protected: |
|
55 T& iLayout; |
|
56 }; |
|
57 |
|
58 #endif |
|
59 |
|
60 // End of File |