1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef UDKSERVICE_XML_CD_HXX 29 #define UDKSERVICE_XML_CD_HXX 30 31 32 #include <tools/string.hxx> 33 #include "x2cstl.hxx" 34 35 36 37 /** Represents one Component description from an XML file. 38 DatumOf() is used for tags with only one value. 39 DataOf() is used, if the tag has multiple values or if 40 you don't know. 41 **/ 42 class ComponentDescription 43 { 44 public: 45 /** @ATTENTION 46 Because the enum values are used as array indices: 47 tag_None must be the first and have the value "0". 48 tag_MAX must be the last. 49 The enum values must not be assigned numbers. 50 **/ 51 enum E_Tag 52 { 53 tag_None = 0, 54 tag_Name, 55 tag_Description, 56 tag_ModuleName, 57 tag_LoaderName, 58 tag_SupportedService, 59 tag_ProjectBuildDependency, 60 tag_RuntimeModuleDependency, 61 tag_ServiceDependency, 62 tag_Language, 63 tag_Status, 64 tag_Type, 65 tag_MAX 66 }; 67 68 virtual ~ComponentDescription() {} 69 70 /// @return All values of this tag. An empty vector for wrong indices. 71 virtual const std::vector< ByteString > & 72 DataOf( 73 ComponentDescription::E_Tag 74 i_eTag ) const = 0; 75 76 /// @return The only or the first value of this tag. An empty string for wrong indices. 77 virtual ByteString DatumOf( 78 ComponentDescription::E_Tag 79 i_eTag ) const = 0; 80 }; 81 82 83 #endif 84 85 86