#include <XmlUserConditionCnv.h>
Inheritance diagram for XmlUserConditionCnv< DeType >:
Public Types | |
| INVALID_ADDRESS | |
| INVALID_OBJECT | |
| NO_MEMORY | |
| BAD_STORAGE_TYPE | |
| NO_SOURCE_OBJECT | |
| ICONVERSIONSVC_LAST_ERROR | |
| SUCCESS | |
| NO_INTERFACE | |
| VERSMISMATCH | |
| LAST_ERROR | |
| enum | Status |
Public Member Functions | |
| XmlUserConditionCnv (ISvcLocator *svc) | |
| Constructor for this converter. | |
| virtual | ~XmlUserConditionCnv () |
| Default destructor. | |
| virtual StatusCode | initialize () |
| Initializes the converter - Overrides the default method in XmlGenericCnv. | |
| virtual StatusCode | finalize () |
| Finalizes the converter. | |
| virtual StatusCode | createObj (IOpaqueAddress *addr, DataObject *&refpObject) |
| Creates the transient representation of an object. | |
| virtual StatusCode | updateObj (IOpaqueAddress *pAddress, DataObject *pObject) |
| Updates the transient object from the other representation. | |
| virtual StatusCode | createRep (DataObject *pObject, IOpaqueAddress *&refpAddress) |
| Converts the transient object to the requested representation. | |
| virtual StatusCode | updateRep (IOpaqueAddress *pAddress, DataObject *pObject) |
| Updates the converted representation of a transient object. | |
| IXmlSvc * | xmlSvc () |
| Accessor to the IXmlSvc interface of the XmlCnvSvc service. | |
| virtual long | repSvcType () const |
| Accessor to the StorageType value. | |
| virtual StatusCode | queryInterface (const InterfaceID &riid, void **ppvInterface) |
| virtual unsigned long | addRef () |
| virtual unsigned long | release () |
| virtual StatusCode | setDataProvider (IDataProviderSvc *svc) |
| virtual IDataProviderSvc * | dataProvider () const |
| virtual StatusCode | setConversionSvc (IConversionSvc *svc) |
| virtual IConversionSvc * | conversionSvc () const |
| virtual StatusCode | setAddressCreator (IAddressCreator *creator) |
| virtual IAddressCreator * | addressCreator () const |
| virtual const CLID & | objType () const |
| virtual long | i_repSvcType () const |
| virtual StatusCode | fillRepRefs (IOpaqueAddress *pAddress, DataObject *pObject) |
| virtual StatusCode | updateRepRefs (IOpaqueAddress *pAddress, DataObject *pObject) |
| StatusCode | service (const std::string &name, T *&psvc, bool createIf=false) const |
| StatusCode | service (const std::string &type, const std::string &name, T *&psvc) const |
Static Public Member Functions | |
| static const CLID & | classID () |
| accessor to the type of elements that this converter converts | |
| static long | storageType () |
| Accessor to the StorageType value. | |
| static const InterfaceID & | interfaceID () |
Public Attributes | |
| INVALID_ADDRESS | |
| INVALID_OBJECT | |
| NO_MEMORY | |
| BAD_STORAGE_TYPE | |
| NO_SOURCE_OBJECT | |
| ICONVERSIONSVC_LAST_ERROR | |
Protected Member Functions | |
| virtual StatusCode | i_createObj (xercesc::DOMElement *element, DataObject *&refpObject) |
| Creates the transient representation of an object from a DOMElement. | |
| virtual StatusCode | i_fillSpecificObj (xercesc::DOMElement *childElement, Condition *refpObject, IOpaqueAddress *address) |
| This fills the current object for specific child. | |
| virtual StatusCode | i_fillSpecificObj (xercesc::DOMElement *childElement, DeType *dataObj, IOpaqueAddress *address) |
| This fills the current object for specific child. | |
| virtual StatusCode | i_fillSpecificObj (xercesc::DOMElement *childElement, DeType *dataObj) |
| This fills the current object for specific child. | |
| virtual StatusCode | fillObjRefs (IOpaqueAddress *pAddress, DataObject *pObject) |
| Resolves the references of the created transient object. | |
| virtual StatusCode | updateObjRefs (IOpaqueAddress *pAddress, DataObject *pObject) |
| Resolves the references of the just updated transient object. | |
| virtual StatusCode | i_fillObj (xercesc::DOMElement *childElement, DataObject *refpObject, IOpaqueAddress *address) |
| Fills the current object for its child element childElement. | |
| virtual StatusCode | i_fillObj (xercesc::DOMText *childText, DataObject *pObject, IOpaqueAddress *address) |
| This fills the current object for its child text node childText. | |
| virtual StatusCode | internalCreateObj (xercesc::DOMElement *element, DataObject *&refpObject, IOpaqueAddress *address) |
| This creates the transient representation of an object from the DOMElement representing it, then fills it and process it. | |
| virtual StatusCode | i_processObj (DataObject *pObject, IOpaqueAddress *address) |
| This is called after the current object was filled. | |
| IOpaqueAddress * | createAddressForHref (std::string href, CLID clid, IOpaqueAddress *parent) const |
| This parses a href attribute string and creates an address out of it Currently, two types of references are understood : regular URLs and references starting with "conddb:/". | |
| IOpaqueAddress * | createXmlAddress (std::string location, std::string entryName, CLID clid) const |
| This creates an XmlAddress using the location, entryName and clid. | |
| IOpaqueAddress * | createCondDBAddress (std::string path, std::string entryName, unsigned long channelId, CLID clid) const |
| This creates a ConddbAddress using the location, entryName, channelID and clid. | |
| ISvcLocator * | serviceLocator () const |
| IMessageSvc * | msgSvc () const |
| IMessageSvc * | messageService () const |
| IDataManagerSvc * | dataManager () const |
Static Protected Member Functions | |
| static const std::string | dom2Std (const XMLCh *domString) |
| builds a standard string from a XMLCh* | |
Protected Attributes | |
| IXmlSvc * | m_xmlSvc |
| the IXmlSvc interface of this object | |
Private Types | |
| typedef XmlUserConditionCnv< DeType > | MyType |
| The type of this object. | |
Friends | |
| class | CnvFactory< MyType > |
| Friend needed for instantiation. | |
Every actual specific convertor for Condition should inherit from this one. It basically provides the i_createObj, classID methods plus a constructor and a destructor. The only thing to do in order to implement an actual specific converter is thus to implement the second i_fillSpecificObj method.
Definition at line 28 of file XmlUserConditionCnv.h.
typedef XmlUserConditionCnv<DeType> XmlUserConditionCnv< DeType >::MyType [private] |
| XmlUserConditionCnv< DeType >::XmlUserConditionCnv | ( | ISvcLocator * | svc | ) |
Constructor for this converter.
| svc | a ISvcLocator interface to find services |
Definition at line 110 of file XmlUserConditionCnv.h.
00111 : XmlBaseConditionCnv (svc, DeType::classID()) { 00112 } // end constructor
| virtual XmlUserConditionCnv< DeType >::~XmlUserConditionCnv | ( | ) | [inline, virtual] |
| static const CLID& XmlUserConditionCnv< DeType >::classID | ( | ) | [inline, static] |
accessor to the type of elements that this converter converts
Reimplemented from XmlBaseConditionCnv.
Definition at line 53 of file XmlUserConditionCnv.h.
| StatusCode XmlUserConditionCnv< DeType >::i_createObj | ( | xercesc::DOMElement * | element, | |
| DataObject *& | refpObject | |||
| ) | [protected, virtual] |
Creates the transient representation of an object from a DOMElement.
Overrides the default method in XmlGenericCnv
| element | the DOMElement to be used to builds the object | |
| refpObject | the object to be built |
Reimplemented from XmlBaseConditionCnv.
Definition at line 120 of file XmlUserConditionCnv.h.
00121 { 00122 MsgStream log(msgSvc(), "XmlUserConditionCnv" ); 00123 log << MSG::DEBUG << "entering i_createObj" << endreq; 00124 00125 // creates an object for the node found 00126 refpObject = new DeType(); 00127 00128 // returns 00129 return StatusCode::SUCCESS; 00130 } // end i_createObj
| StatusCode XmlUserConditionCnv< DeType >::i_fillSpecificObj | ( | xercesc::DOMElement * | childElement, | |
| Condition * | refpObject, | |||
| IOpaqueAddress * | address | |||
| ) | [protected, virtual] |
This fills the current object for specific child.
This is a very general method reimplemented from XmlBaseConditionCnv. It basically calls the other i_fillSpecificObj after casting the current object to its real type.
| childElement | the specific child processed here | |
| refpObject | the object to be filled | |
| address | the address for this object |
Implements XmlBaseConditionCnv.
Definition at line 139 of file XmlUserConditionCnv.h.
00141 { 00142 DeType* dataObj = dynamic_cast<DeType*> (refpObject); 00143 return i_fillSpecificObj (childElement, dataObj, address); 00144 }
| StatusCode XmlUserConditionCnv< DeType >::i_fillSpecificObj | ( | xercesc::DOMElement * | childElement, | |
| DeType * | dataObj, | |||
| IOpaqueAddress * | address | |||
| ) | [protected, virtual] |
This fills the current object for specific child.
This should never be called directly but always through the other i_fillSpecificObj. This actually only exist to avoid the user to implement a dynamic cast from Condition into DeType.
| childElement | the specific child processed here | |
| dataObj | the object to be filled | |
| address | the address for this object |
Definition at line 152 of file XmlUserConditionCnv.h.
00154 { 00155 return i_fillSpecificObj (childElement, dataObj); 00156 }
| StatusCode XmlUserConditionCnv< DeType >::i_fillSpecificObj | ( | xercesc::DOMElement * | childElement, | |
| DeType * | dataObj | |||
| ) | [protected, virtual] |
This fills the current object for specific child.
| childElement | the specific child processed here | |
| dataObj | the object to be filled |
Definition at line 164 of file XmlUserConditionCnv.h.
00165 { 00166 return StatusCode::SUCCESS; 00167 }
| virtual StatusCode XmlBaseConditionCnv::initialize | ( | ) | [virtual, inherited] |
Initializes the converter - Overrides the default method in XmlGenericCnv.
Reimplemented from XmlGenericCnv.
| virtual StatusCode XmlBaseConditionCnv::fillObjRefs | ( | IOpaqueAddress * | pAddress, | |
| DataObject * | pObject | |||
| ) | [protected, virtual, inherited] |
| virtual StatusCode XmlBaseConditionCnv::updateObjRefs | ( | IOpaqueAddress * | pAddress, | |
| DataObject * | pObject | |||
| ) | [protected, virtual, inherited] |
| virtual StatusCode XmlBaseConditionCnv::i_fillObj | ( | xercesc::DOMElement * | childElement, | |
| DataObject * | refpObject, | |||
| IOpaqueAddress * | address | |||
| ) | [protected, virtual, inherited] |
Fills the current object for its child element childElement.
Overrides the default method in XmlGenericCnv
| childElement | the child processed here | |
| refpObject | the object to be filled | |
| address | the address for this object |
Reimplemented from XmlGenericCnv.
| virtual StatusCode XmlGenericCnv::i_fillObj | ( | xercesc::DOMText * | childText, | |
| DataObject * | pObject, | |||
| IOpaqueAddress * | address | |||
| ) | [protected, virtual, inherited] |
This fills the current object for its child text node childText.
This will be called for each text child of the current object
| childText | the child processed here | |
| pObject | the object to be filled | |
| address | the address for this object |
| virtual StatusCode XmlGenericCnv::finalize | ( | ) | [virtual, inherited] |
Finalizes the converter.
Reimplemented from Converter.
| virtual StatusCode XmlGenericCnv::createObj | ( | IOpaqueAddress * | addr, | |
| DataObject *& | refpObject | |||
| ) | [virtual, inherited] |
Creates the transient representation of an object.
| addr | the address of the object representation | |
| refpObject | the object created |
Reimplemented from Converter.
| virtual StatusCode XmlGenericCnv::updateObj | ( | IOpaqueAddress * | pAddress, | |
| DataObject * | pObject | |||
| ) | [virtual, inherited] |
Updates the transient object from the other representation.
| pAddress | the address of the object representation | |
| pObject | the object updated |
Reimplemented from Converter.
| virtual StatusCode XmlGenericCnv::createRep | ( | DataObject * | pObject, | |
| IOpaqueAddress *& | refpAddress | |||
| ) | [virtual, inherited] |
Converts the transient object to the requested representation.
| refpAddress | the address of the object representation | |
| pObject | the object to convert |
Reimplemented from Converter.
| virtual StatusCode XmlGenericCnv::updateRep | ( | IOpaqueAddress * | pAddress, | |
| DataObject * | pObject | |||
| ) | [virtual, inherited] |
Updates the converted representation of a transient object.
| pAddress | the address of the object representation | |
| pObject | the object whose representation has to be updated |
Reimplemented from Converter.
| IXmlSvc* XmlGenericCnv::xmlSvc | ( | ) | [inline, inherited] |
Accessor to the IXmlSvc interface of the XmlCnvSvc service.
status depending on the completion of the call
Definition at line 91 of file XmlGenericCnv.h.
00091 { 00092 if (!m_xmlSvc) m_xmlSvc = dynamic_cast<IXmlSvc*>(conversionSvc()); 00093 return m_xmlSvc; 00094 }
| static long XmlGenericCnv::storageType | ( | ) | [inline, static, inherited] |
Accessor to the StorageType value.
Definition at line 100 of file XmlGenericCnv.h.
00100 { 00101 return XML_StorageType; 00102 }
| virtual long XmlGenericCnv::repSvcType | ( | ) | const [inline, virtual, inherited] |
Accessor to the StorageType value.
Implements Converter.
Definition at line 108 of file XmlGenericCnv.h.
00108 { 00109 return XML_StorageType; 00110 }
| virtual StatusCode XmlGenericCnv::internalCreateObj | ( | xercesc::DOMElement * | element, | |
| DataObject *& | refpObject, | |||
| IOpaqueAddress * | address | |||
| ) | [protected, virtual, inherited] |
This creates the transient representation of an object from the DOMElement representing it, then fills it and process it.
This implementation actually only calls the i_* methods to do the job. Most of the converters don't need to override it but only to override/implement some of the i_* methods.
| element | the DOMElement to be used to builds the object | |
| refpObject | the object to be built | |
| address | the address for this object |
| virtual StatusCode XmlGenericCnv::i_processObj | ( | DataObject * | pObject, | |
| IOpaqueAddress * | address | |||
| ) | [protected, virtual, inherited] |
This is called after the current object was filled.
This is were some computation based on the object content could be done
| pObject | the object to be processed | |
| address | the address for this object |
| IOpaqueAddress* XmlGenericCnv::createAddressForHref | ( | std::string | href, | |
| CLID | clid, | |||
| IOpaqueAddress * | parent | |||
| ) | const [protected, inherited] |
This parses a href attribute string and creates an address out of it Currently, two types of references are understood : regular URLs and references starting with "conddb:/".
The former create addresses with storage type XML_StorageType, the later addresses with storage type CONDDB_StorageType.
| href | the string contained in the href attribute | |
| clid | the clid of the address to create | |
| parent | the address of the dataObject that will contain the new object. |
| IOpaqueAddress* XmlGenericCnv::createXmlAddress | ( | std::string | location, | |
| std::string | entryName, | |||
| CLID | clid | |||
| ) | const [protected, inherited] |
This creates an XmlAddress using the location, entryName and clid.
| location | the location string for this address | |
| entryName | the entryName string for this address | |
| clid | the clidof the address to create |
| IOpaqueAddress* XmlGenericCnv::createCondDBAddress | ( | std::string | path, | |
| std::string | entryName, | |||
| unsigned long | channelId, | |||
| CLID | clid | |||
| ) | const [protected, inherited] |
This creates a ConddbAddress using the location, entryName, channelID and clid.
| path | the path string for this address | |
| entryName | the entryName string for this address | |
| channelId | the channelID for this address | |
| clid | the clidof the address to create |
| static const std::string XmlGenericCnv::dom2Std | ( | const XMLCh * | domString | ) | [static, protected, inherited] |
builds a standard string from a XMLCh*
| domString | the XMLCh* |
friend class CnvFactory< MyType > [friend] |
IXmlSvc* XmlGenericCnv::m_xmlSvc [protected, inherited] |
1.4.7