struct NodeValueAccessor
{ private:
OUString sRelativePath; // the relative path of the node
LocationType eLocationType; // the type of location where the value is stored void* pLocation; // the pointer to the location
Type aDataType; // the type object pointed to by pLocation
/// base class for functors synchronizing between exchange locations and config sub nodes struct SubNodeAccess
{ protected: const OConfigurationNode& m_rRootNode;
std::mutex& m_rMutex;
struct OConfigurationValueContainerImpl
{
Reference< XComponentContext > xORB; // the service factory
std::mutex& rMutex; // the mutex for accessing the data containers
OConfigurationTreeRoot aConfigRoot; // the configuration node we're accessing
std::vector<NodeValueAccessor> aAccessors; // the accessors to the node values
// create the configuration node we're about to work with
m_pImpl->aConfigRoot = OConfigurationTreeRoot::createWithComponentContext(
m_pImpl->xORB,
_rConfigLocation,
_nLevels
);
SAL_WARN_IF(!m_pImpl->aConfigRoot.isValid(), "unotools.config", "Could not access the configuration node located at " << _rConfigLocation);
}
void OConfigurationValueContainer::commit()
{ // write the current values in the exchange locations
std::for_each(
m_pImpl->aAccessors.begin(),
m_pImpl->aAccessors.end(),
UpdateToConfig( m_pImpl->aConfigRoot, m_pImpl->rMutex )
);
// commit the changes done
m_pImpl->aConfigRoot.commit( );
}
// another check (should be the first container for this node)
SAL_WARN_IF(!(m_pImpl->aAccessors.end() == ::std::find(
m_pImpl->aAccessors.begin(),
m_pImpl->aAccessors.end(),
_rAccessor)), "unotools.config", "OConfigurationValueContainer::implRegisterExchangeLocation: already registered a container for this subnode!" );
// remember the accessor
m_pImpl->aAccessors.push_back( _rAccessor );
// and initially fill the value
lcl_copyData( _rAccessor, m_pImpl->aConfigRoot.getNodeValue( _rAccessor.getPath() ), m_pImpl->rMutex );
}
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.11Bemerkung:
(vorverarbeitet am 2026-09-28)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.