merge the formfield patch from ooo-build
[ooovba.git] / xml2cmp / source / x2cclass / xml_cd.hxx
blobf4f80b97186d157156757d4fe62c02b1710c9d78
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: xml_cd.hxx,v $
10 * $Revision: 1.3 $
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 UDKSERVICE_XML_CD_HXX
32 #define UDKSERVICE_XML_CD_HXX
35 #include <tools/string.hxx>
36 #include "x2cstl.hxx"
40 /** Represents one Component description from an XML file.
41 DatumOf() is used for tags with only one value.
42 DataOf() is used, if the tag has multiple values or if
43 you don't know.
44 **/
45 class ComponentDescription
47 public:
48 /** @ATTENTION
49 Because the enum values are used as array indices:
50 tag_None must be the first and have the value "0".
51 tag_MAX must be the last.
52 The enum values must not be assigned numbers.
53 **/
54 enum E_Tag
56 tag_None = 0,
57 tag_Name,
58 tag_Description,
59 tag_ModuleName,
60 tag_LoaderName,
61 tag_SupportedService,
62 tag_ProjectBuildDependency,
63 tag_RuntimeModuleDependency,
64 tag_ServiceDependency,
65 tag_Language,
66 tag_Status,
67 tag_Type,
68 tag_MAX
71 virtual ~ComponentDescription() {}
73 /// @return All values of this tag. An empty vector for wrong indices.
74 virtual const std::vector< ByteString > &
75 DataOf(
76 ComponentDescription::E_Tag
77 i_eTag ) const = 0;
79 /// @return The only or the first value of this tag. An empty string for wrong indices.
80 virtual ByteString DatumOf(
81 ComponentDescription::E_Tag
82 i_eTag ) const = 0;
86 #endif