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 INCLUDED_CONFIGMGR_SOURCE_PROPERTYNODE_HXX 25 #define INCLUDED_CONFIGMGR_SOURCE_PROPERTYNODE_HXX 26 27 #include "sal/config.h" 28 29 #include "com/sun/star/uno/Any.hxx" 30 #include "rtl/ref.hxx" 31 32 #include "node.hxx" 33 #include "type.hxx" 34 35 namespace rtl { class OUString; } 36 37 namespace configmgr { 38 39 class Components; 40 41 class PropertyNode: public Node { 42 public: 43 PropertyNode( 44 int layer, Type staticType, bool nillable, 45 com::sun::star::uno::Any const & value, bool extension); 46 47 virtual rtl::Reference< Node > clone(bool keepTemplateName) const; 48 49 Type getStaticType() const; 50 51 bool isNillable() const; 52 53 com::sun::star::uno::Any getValue(Components & components); 54 55 void setValue(int layer, com::sun::star::uno::Any const & value); 56 57 void setExternal(int layer, rtl::OUString const & descriptor); 58 59 bool isExtension() const; 60 61 private: 62 PropertyNode(PropertyNode const & other); 63 64 virtual ~PropertyNode(); 65 66 virtual Kind kind() const; 67 68 Type staticType_; 69 // as specified in the component-schema (TYPE_ANY, ..., 70 // TYPE_HEXBINARY_LIST; not TYPE_ERROR or TYPE_NIL) 71 bool nillable_; 72 com::sun::star::uno::Any value_; 73 rtl::OUString externalDescriptor_; 74 bool extension_; 75 }; 76 77 } 78 79 #endif 80