summaryrefslogtreecommitdiff
path: root/configmgr/source/inc/valuenodeaccess.hxx
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2003-04-01 12:35:21 +0000
committerVladimir Glazounov <vg@openoffice.org>2003-04-01 12:35:21 +0000
commit032187b3ed5ddb6f5de67285d49f3767601c6eec (patch)
treeff4675d3e34714ef69d0b016b4c16529ac7eb678 /configmgr/source/inc/valuenodeaccess.hxx
parent509dad3bbb966e795fbf143654b4af19423d5312 (diff)
INTEGRATION: CWS cfg01 (1.2.24); FILE MERGED
2003/03/13 15:28:15 jb 1.2.24.2: #108154# Use NodeAccessRef to avoid copying Accessor objects 2003/02/28 16:33:18 ssmith 1.2.24.1: #107403# #107403# adding support for mandatory flag and changing dynamic properties semantics
Diffstat (limited to 'configmgr/source/inc/valuenodeaccess.hxx')
-rw-r--r--configmgr/source/inc/valuenodeaccess.hxx21
1 files changed, 14 insertions, 7 deletions
diff --git a/configmgr/source/inc/valuenodeaccess.hxx b/configmgr/source/inc/valuenodeaccess.hxx
index fdcde9069e78..48efbcf9df97 100644
--- a/configmgr/source/inc/valuenodeaccess.hxx
+++ b/configmgr/source/inc/valuenodeaccess.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: valuenodeaccess.hxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: jb $ $Date: 2002-03-28 08:47:03 $
+ * last change: $Author: vg $ $Date: 2003-04-01 13:35:21 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -99,7 +99,14 @@ namespace configmgr
{
}
- static bool isInstance(NodeAccess const & _aNode)
+ explicit
+ ValueNodeAccess(NodeAccessRef const & _aNode)
+ : m_aAccessor(_aNode.accessor())
+ , m_pData(check(_aNode))
+ {
+ }
+
+ static bool isInstance(NodeAccessRef const & _aNode)
{
return check(_aNode) != NULL;
}
@@ -127,14 +134,14 @@ namespace configmgr
static void changeDefault(memory::UpdateAccessor & _aUpdater, NodeAddressType _aValueNode, uno::Any const& _aValue);
NodeAddressType address() const { return NodeAddressType(m_pData); }
- Accessor accessor() const { return m_aAccessor; }
+ Accessor const& accessor() const { return m_aAccessor; }
DataType& data() const { return *static_cast<NodePointerType>(m_aAccessor.validate(m_pData)); }
- operator NodeAccess() const { return NodeAccess(m_aAccessor,NodeAddress(m_pData)); }
+ operator NodeAccessRef() const { return NodeAccessRef(&m_aAccessor,NodeAddress(m_pData)); }
private:
static AddressType check(Accessor const& _acc, NodePointerType _p) { return _acc.address(_p); }
- static AddressType check(NodeAccess const& _aNodeData);
+ static AddressType check(NodeAccessRef const& _aNodeData);
Accessor m_aAccessor;
AddressType m_pData;
@@ -150,7 +157,7 @@ namespace configmgr
inline
NodeAccess::Attributes ValueNodeAccess::getAttributes() const
- { return data().info.getAttributes(); }
+ { return sharable::node(data()).getAttributes(); }
inline
bool ValueNodeAccess::isDefault() const