00001 /* 00002 * XmlConfigurable.hpp 00003 * 00004 * Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. 00005 * 00006 * Oracle is a registered trademarks of Oracle Corporation and/or its 00007 * affiliates. 00008 * 00009 * This software is the confidential and proprietary information of Oracle 00010 * Corporation. You shall not disclose such confidential and proprietary 00011 * information and shall use it only in accordance with the terms of the 00012 * license agreement you entered into with Oracle. 00013 * 00014 * This notice may not be removed or altered. 00015 */ 00016 #ifndef COH_XML_CONFIGURABLE_HPP 00017 #define COH_XML_CONFIGURABLE_HPP 00018 00019 #include "coherence/lang.ns" 00020 00021 #include "coherence/run/xml/XmlElement.hpp" 00022 00023 COH_OPEN_NAMESPACE3(coherence,run,xml) 00024 00025 00026 /** 00027 * XmlConfigurable interface represents an {@link coherence::lang::Object 00028 * Object} that can be configured by providing configuration information from 00029 * XML structure. 00030 */ 00031 class COH_EXPORT XmlConfigurable 00032 : public interface_spec<XmlConfigurable> 00033 { 00034 // ----- XmlConfigurable interface -------------------------------------- 00035 00036 public: 00037 /** 00038 * If this {@link coherence::lang::Object Object} was previously 00039 * configured using some XML configuration, the corresponding 00040 * XmlElement is returned. 00041 * 00042 * @return a view of the XmlElement used to configure this Object 00043 */ 00044 virtual XmlElement::View getConfig() const = 0; 00045 00046 /** 00047 * Configure this {@link coherence::lang::Object Object} using the 00048 * provided XmlElement 00049 * 00050 * @param vXml the XML configuration to set 00051 */ 00052 virtual void setConfig(XmlElement::View vXml) = 0; 00053 }; 00054 00055 COH_CLOSE_NAMESPACE3 00056 00057 #endif // COH_XML_CONFIGURABLE_HPP