diff options
author | sb <sb@openoffice.org> | 2009-05-15 14:06:56 +0200 |
---|---|---|
committer | sb <sb@openoffice.org> | 2009-05-15 14:06:56 +0200 |
commit | 6b849a6aeeb9ea8b1e25e28d5a8be390e425f84e (patch) | |
tree | 2ee548c2ff5d3df79ff5f8068b9e0ce2f26576dd /configmgr2/source/propertynode.cxx | |
parent | 07f98fafacd919fe84e7ffec134270ae215c6dac (diff) |
#i101955# initial work in progress of a configmgr reimplementation (for now in an extra module "configmgr2")
Diffstat (limited to 'configmgr2/source/propertynode.cxx')
-rw-r--r-- | configmgr2/source/propertynode.cxx | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/configmgr2/source/propertynode.cxx b/configmgr2/source/propertynode.cxx new file mode 100644 index 000000000000..abee563df260 --- /dev/null +++ b/configmgr2/source/propertynode.cxx @@ -0,0 +1,99 @@ +/************************************************************************* +* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +* +* Copyright 2009 by Sun Microsystems, Inc. +* +* OpenOffice.org - a multi-platform office productivity suite +* +* $RCSfile: code,v $ +* +* $Revision: 1.4 $ +* +* This file is part of OpenOffice.org. +* +* OpenOffice.org is free software: you can redistribute it and/or modify +* it under the terms of the GNU Lesser General Public License version 3 +* only, as published by the Free Software Foundation. +* +* OpenOffice.org is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU Lesser General Public License version 3 for more details +* (a copy is included in the LICENSE file that accompanied this code). +* +* You should have received a copy of the GNU Lesser General Public License +* version 3 along with OpenOffice.org. If not, see +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +************************************************************************/ + +#include "precompiled_configmgr.hxx" +#include "sal/config.h" + +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "osl/diagnose.h" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" + +#include "node.hxx" +#include "propertynode.hxx" +#include "type.hxx" + +namespace configmgr { + +namespace { + +namespace css = com::sun::star; + +} + +PropertyNode::PropertyNode( + rtl::OUString const & name, Type type, bool nillable, + css::uno::Any const & value, bool extension): + name_(name), type_(type), nillable_(nillable), value_(value), + extension_(extension) +{} + +PropertyNode::~PropertyNode() {} + +Node * PropertyNode::clone() const { + return new PropertyNode(*this); +} + +Node * PropertyNode::clone(rtl::OUString const &) const { + OSL_ASSERT(false); + throw css::uno::RuntimeException( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("this cannot happen")), + 0); +} + +rtl::OUString PropertyNode::getName() { + return name_; +} + +Node * PropertyNode::getMember(rtl::OUString const &) { + return 0; +} + +Type PropertyNode::getType() const { + return type_; +} + +bool PropertyNode::isNillable() const { + return nillable_; +} + +css::uno::Any PropertyNode::getValue() const { + return value_; +} + +void PropertyNode::setValue(css::uno::Any const & value) { + value_ = value; +} + +bool PropertyNode::isExtension() const { + return extension_; +} + +} |