class CSenBaseElement : public CSenElement |
Protected Member Functions | |
---|---|
CSenBaseElement () | |
IMPORT_C const TDesC8 & | AddAttributeL (const TDesC8 &, const TDesC8 &, const TDesC8 &) |
IMPORT_C const TDesC8 & | AddAttributeL (const TDesC8 &, const TDesC8 &) |
IMPORT_C const TDesC8 & | AddAttributeL ( CSenBaseAttribute *) |
IMPORT_C void | AllocContentBufL () |
IMPORT_C void | BaseConstructL (const TDesC8 &) |
IMPORT_C void | BaseConstructL (const TDesC8 &, const TDesC8 &) |
IMPORT_C void | BaseConstructL (const TDesC8 &, const TDesC8 &, const TDesC8 &) |
IMPORT_C void | BaseConstructL (const TDesC8 &, const TDesC8 &, const TDesC8 &, const RAttributeArray &) |
IMPORT_C void | BaseConstructL (const TDesC8 &, const TDesC8 &, const TDesC8 &, const RAttributeArray &, CSenElement &) |
IMPORT_C CSenBaseAttribute * | FindAttr (const TDesC8 &) |
IMPORT_C TInt | IndexOfElement (const TDesC8 &, const TDesC8 &) |
IMPORT_C void | WriteAttrToL ( RWriteStream &, const TDesC8 &, const TDesC8 &) |
IMPORT_C void | WriteAttrsToL ( RWriteStream &) |
IMPORT_C void | WriteContentToL ( RWriteStream &) |
IMPORT_C void | WriteElementsToL ( RWriteStream &) |
IMPORT_C TPtrC8 | WriteToBufL ( CBufBase &) |
Private Member Functions | |
---|---|
void | AddNamespaceMissingFromL ( RPointerArray < CSenNamespace > &) |
Private Attributes | |
---|---|
RPointerArray < CSenBaseAttribute > | iAttrs |
RBufWriteStream | iContentWriteStream |
RPointerArray < CSenElement > | iElements |
RPointerArray < CSenNamespace > | iNamespaces |
HBufC8 * | iNotUsed |
CBufFlat * | ipContentBuf |
HBufC8 * | ipLocalName |
CSenNamespace * | ipNamespace |
CSenElement * | ipParent |
IMPORT_C void | AddAttrL | ( | const TDesC8 & | aName, |
const TDesC8 & | aValue | |||
) | [virtual] |
Adds an attribute. If attribute is already existing, the value of the attribute will be replaced.
IMPORT_C const TDesC8 & | AddAttributeL | ( | const TDesC8 & | aQName, |
const TDesC8 & | aLocalName, | |||
const TDesC8 & | aValue | |||
) | [protected, virtual] |
Adds an attribute into this element. Used also adding new namespaces into the element.
IMPORT_C const TDesC8 & | AddAttributeL | ( | const TDesC8 & | aAttrName, |
const TDesC8 & | aValue | |||
) | [protected, virtual] |
Adds an attribute into this element. Used also adding new namespaces into the element.
IMPORT_C const TDesC8 & | AddAttributeL | ( | CSenBaseAttribute * | apAttribute | ) | [protected] |
Adds an attribute into this element.
CSenBaseAttribute * apAttribute | Attribute to be added. Ownership is transferred to this element. |
IMPORT_C void | AddAttributesL | ( | const RAttributeArray & | apAttrs | ) | [virtual] |
Adds new attributes to the element.
const RAttributeArray & apAttrs |
IMPORT_C CSenElement & | AddElementL | ( | CSenElement & | aElement | ) | [virtual] |
Adds an Element to the children elements. Sets this element to be the new parent of the given element.
CSenElement & aElement |
IMPORT_C CSenElement & | AddElementL | ( | const TDesC8 & | aNsUri, |
const TDesC8 & | aLocalName | |||
) | [virtual] |
Constructs and adds a new element to the children elements. Sets this element to be the new parent of the given element.
IMPORT_C CSenElement & | AddElementL | ( | const TDesC8 & | aNsUri, |
const TDesC8 & | aLocalName, | |||
const TDesC8 & | aQName | |||
) | [virtual] |
Constructs and adds a new element to the children elements. Sets this element to be the new parent of the given element.
IMPORT_C CSenElement & | AddElementL | ( | const TDesC8 & | aLocalName | ) | [virtual] |
Constructs and adds a new element to the children elements. Sets this element to be the new parent of the given element. Note: Element is created with no specific namespace, default namespace of some of the upper level elements are in effect if there is such a namespace.
const TDesC8 & aLocalName |
IMPORT_C const CSenNamespace * | AddNamespaceL | ( | CSenNamespace & | aNewNamespace, |
TBool | aCheckInParent | |||
) | [virtual] |
Adds a namespace declaration. If this element (or its parent if parameter aCheckInParent is ETrue) already has a Namespace with the same prefix and URI the given Namespace is not added.
CSenNamespace & aNewNamespace | |
TBool aCheckInParent |
IMPORT_C const CSenNamespace * | AddNamespaceL | ( | const TDesC8 & | aPrefix, |
const TDesC8 & | aUri | |||
) | [virtual] |
Method for adding a namespace for the Element.
void | AddNamespaceMissingFromL | ( | RPointerArray < CSenNamespace > & | aNamespaces | ) | [private] |
RPointerArray < CSenNamespace > & aNamespaces |
IMPORT_C void | AllocContentBufL | ( | ) | [protected, virtual] |
Allocates a new buffer for saving content, if none allocated yet.
IMPORT_C MSenElement * | AsElement | ( | ) | [virtual] |
Gets the current element as XML element. Mostly used to get the classes which implement this interface as an instance of this interface.
IMPORT_C HBufC8 * | AsXmlL | ( | ) | [virtual] |
Gets the element as an XML buffer. Buffer will contain all the childs
IMPORT_C HBufC * | AsXmlUnicodeL | ( | ) | [virtual] |
Gets the element as an unicode XML buffer. Buffer will contain all the childs etc.
IMPORT_C const TDesC8 * | AttrValue | ( | const TDesC8 & | aName | ) | [virtual] |
Gets the value of the given attribute.
const TDesC8 & aName |
IMPORT_C RPointerArray < CSenBaseAttribute > & | AttributesL | ( | ) | [virtual] |
Gets all the attributes of this element in an array.
IMPORT_C void | BaseConstructL | ( | const TDesC8 & | aLocalName | ) | [protected] |
Following BaseConstructL methods should be called from the deriving classes ConstructL() methods. Parameter info is found in the corresponding NewL-methods.
const TDesC8 & aLocalName |
IMPORT_C void | BaseConstructL | ( | const TDesC8 & | aNsUri, |
const TDesC8 & | aLocalName | |||
) | [protected] |
IMPORT_C void | BaseConstructL | ( | const TDesC8 & | aNsUri, |
const TDesC8 & | aLocalName, | |||
const TDesC8 & | aQName | |||
) | [protected] |
IMPORT_C void | BaseConstructL | ( | const TDesC8 & | aNsUri, |
const TDesC8 & | aLocalName, | |||
const TDesC8 & | aQName, | |||
const RAttributeArray & | apAttrs | |||
) | [protected] |
const TDesC8 & aNsUri | |
const TDesC8 & aLocalName | |
const TDesC8 & aQName | |
const RAttributeArray & apAttrs |
IMPORT_C void | BaseConstructL | ( | const TDesC8 & | aNsUri, |
const TDesC8 & | aLocalName, | |||
const TDesC8 & | aQName, | |||
const RAttributeArray & | apAttrs, | |||
CSenElement & | aParent | |||
) | [protected] |
const TDesC8 & aNsUri | |
const TDesC8 & aLocalName | |
const TDesC8 & aQName | |
const RAttributeArray & apAttrs | |
CSenElement & aParent |
IMPORT_C CSenElement * | Child | ( | TInt | aIndex | ) | [virtual] |
Gets a child element from a specified index.
TInt aIndex |
IMPORT_C TBool | ConsistsOfL | ( | MSenElement & | aCandidate | ) | [virtual] |
MSenElement & aCandidate | The pattern to be matched. Must contain same or less data for match to come true. |
IMPORT_C HBufC * | ContentUnicodeL | ( | ) | const [virtual] |
Getter for the content of the element, unicode version.
IMPORT_C RWriteStream & | ContentWriteStreamL | ( | ) | [virtual] |
Gets the write stream for the content for easy appending. Writing 8-bit (UTF-8) string to the returned stream will be appended to the content.
IMPORT_C void | CopyFromL | ( | CSenElement & | aSource | ) | [virtual] |
Copies content from given element to this element appending to the existing content if there is any.
CSenElement & aSource |
IMPORT_C CSenElement * | CreateElementL | ( | const TDesC8 & | aNsPrefix, |
const TDesC8 & | aLocalName | |||
) | [virtual] |
Create a new element ready for adding or insertion. If the given namespace prefix is not declared yet the element will not be created and NULL will be returned.
IMPORT_C CSenElement * | DetachL | ( | ) | [virtual] |
Detach the element from its parent. If the element, or one of its children, is dependent on a namespace declared in the scope of the parent copy those namespace declarations to this element.
IMPORT_C CSenElement * | Element | ( | const TDesC8 & | aLocalName | ) | [virtual] |
Gets the child element with the specified local name. Assumes that namespace is the same as this parent element.
const TDesC8 & aLocalName |
IMPORT_C CSenElement * | Element | ( | const TDesC8 & | aNsUri, |
const TDesC8 & | aLocalName | |||
) | [virtual] |
Gets the child element with the specified local name and namespace URI.
IMPORT_C TInt | ElementsL | ( | RPointerArray < CSenElement > & | aElementArray, |
const TDesC8 & | aNsUri, | |||
const TDesC8 & | aLocalName | |||
) | [virtual] |
Getting the child elements of this element matching the given criteria.
RPointerArray < CSenElement > & aElementArray | |
const TDesC8 & aNsUri | |
const TDesC8 & aLocalName |
IMPORT_C TInt | ElementsL | ( | RPointerArray < CSenElement > & | aElementArray, |
const TDesC8 & | aLocalName | |||
) | [virtual] |
Getting the child elements of this element matching the given criteria.
RPointerArray < CSenElement > & aElementArray | |
const TDesC8 & aLocalName |
IMPORT_C RPointerArray < CSenElement > & | ElementsL | ( | ) | [virtual] |
Getting the child elements of this element.
IMPORT_C CSenBaseAttribute * | FindAttr | ( | const TDesC8 & | aName | ) | [protected, virtual] |
Method for finding an attribute with given name.
const TDesC8 & aName | a name of the attribute to be searched for |
IMPORT_C TBool | HasContent | ( | ) | const [virtual] |
Method for checking if the element has any content within.
IMPORT_C TInt | IndexOfElement | ( | const TDesC8 & | aNsUri, |
const TDesC8 & | aLocalName | |||
) | const [protected, virtual] |
Method for finding index for a wanted element.
IMPORT_C CSenElement & | InsertElementL | ( | CSenElement & | aElement, |
const CSenElement & | aBeforeElement | |||
) | [virtual] |
Insert an Element into the list of children elements so that the inserted Element is placed right before the aBeforeElement. If aBeforeElement is not found, element will be appended to the last position. Function leaves if error occurs in inserting.
CSenElement & aElement | |
const CSenElement & aBeforeElement |
IMPORT_C const CSenNamespace * | Namespace | ( | const TDesC8 & | aNsPrefix | ) | [virtual] |
const TDesC8 & aNsPrefix |
IMPORT_C const CSenNamespace * | Namespace | ( | const TDesC8 & | aNsPrefix, |
const TBool | aCheckInParent | |||
) | [virtual] |
IMPORT_C const CSenNamespace * | Namespace | ( | const TDesC8 & | aNsPrefix, |
const TDesC8 & | aUri | |||
) | [virtual] |
IMPORT_C const TDesC8 & | NamespaceURI | ( | ) | const [virtual] |
Getter for Element's namespace URI.
IMPORT_C RPointerArray < CSenNamespace > & | NamespacesL | ( | ) | [virtual] |
Gets all the namespaces of this element in an array.
IMPORT_C CSenBaseElement * | NewL | ( | const TDesC8 & | aLocalName | ) | [static] |
Standard constructor.
const TDesC8 & aLocalName | the local name for this element. Leave codes: KErrSenInvalidCharacters if aLocalName contains illegal characters. KErrSenZeroLengthDescriptor if aLocalName is zero length. |
IMPORT_C CSenBaseElement * | NewL | ( | const TDesC8 & | aNsUri, |
const TDesC8 & | aLocalName | |||
) | [static] |
Standard constructor.
IMPORT_C CSenBaseElement * | NewL | ( | const TDesC8 & | aNsUri, |
const TDesC8 & | aLocalName, | |||
const TDesC8 & | aQName | |||
) | [static] |
Standard constructor.
const TDesC8 & aNsUri | the namespace URI for this element. |
const TDesC8 & aLocalName | the local name for this element. |
const TDesC8 & aQName | the qualified name for this element. Leave codes: KErrSenInvalidCharacters if aLocalName or aQName contains illegal characters. KErrSenZeroLengthDescriptor if aLocalName or aQName is zero length. |
IMPORT_C CSenBaseElement * | NewL | ( | const TDesC8 & | aNsUri, |
const TDesC8 & | aLocalName, | |||
const TDesC8 & | aQName, | |||
const RAttributeArray & | apAttrs | |||
) | [static] |
Standard constructor.
const TDesC8 & aNsUri | the namespace URI for this element. |
const TDesC8 & aLocalName | the local name for this element. |
const TDesC8 & aQName | the qualified name for this element. |
const RAttributeArray & apAttrs | the attributes for this element. Leave codes: KErrSenInvalidCharacters if aLocalName or aQName contains illegal characters. KErrSenZeroLengthDescriptor if aLocalName or aQName is zero length. |
IMPORT_C CSenBaseElement * | NewL | ( | const TDesC8 & | aNsUri, |
const TDesC8 & | aLocalName, | |||
const TDesC8 & | aQName, | |||
const RAttributeArray & | apAttrs, | |||
CSenElement & | aParent | |||
) | [static] |
Standard constructor.
const TDesC8 & aNsUri | the namespace URI for this element. |
const TDesC8 & aLocalName | the local name for this element. |
const TDesC8 & aQName | the qualified name for this element. |
const RAttributeArray & apAttrs | the attributes for this element. |
CSenElement & aParent |
IMPORT_C const TDesC8 & | NsPrefix | ( | ) | const [virtual] |
Getter for namespace prefix of this element.
IMPORT_C CSenElement * | RemoveElement | ( | CSenElement & | aElement | ) | [virtual] |
Remove an element from the childs.
CSenElement & aElement |
IMPORT_C CSenElement * | RemoveElement | ( | const TDesC8 & | aNsUri, |
const TDesC8 & | aLocalName | |||
) | [virtual] |
Remove an element from the childs.
IMPORT_C CSenElement * | RemoveElement | ( | const TDesC8 & | aLocalName | ) | [virtual] |
Remove an element from the childs.
const TDesC8 & aLocalName |
IMPORT_C CSenElement * | ReplaceElementL | ( | CSenElement & | aElement | ) | [virtual] |
Replaces an element from the childs with another element. Element's local name and namespace URI will be used to match the element to be replaced. If matching element is not found, will normally add the given element to the childs.
CSenElement & aElement |
IMPORT_C MSenElement & | Root | ( | ) | [virtual] |
Gets the root element. If no parent element, returns this element.
IMPORT_C void | Set | ( | const TDesC8 & | aNsUri, |
const TDesC8 & | aLocalName, | |||
const TDesC8 & | aQName | |||
) | [virtual] |
(Re-) Set the name and namespace of this Element. The element will be given the localName in the the given namespace. A prefix will be computed from the qualified name. This method should be used with care and is mainly intended for protected use in implementations.
IMPORT_C void | SetAttributesL | ( | const RAttributeArray & | apAttrs | ) | [virtual] |
Adds attributes to the element. Calls internally AddAttributesL() Can be overridden to replace old attributes.
const RAttributeArray & apAttrs |
IMPORT_C TPtrC8 | SetContentL | ( | const TDesC8 & | aContent | ) | [virtual] |
Sets the content to the element. Old content is overwritten.
const TDesC8 & aContent |
IMPORT_C void | SetNamespaceL | ( | const TDesC8 & | aNsUri | ) | [virtual] |
Setter for Element's namespace URI.
const TDesC8 & aNsUri |
IMPORT_C void | SetNamespaceL | ( | const TDesC8 & | aNsPrefix, |
const TDesC8 & | aNsUri | |||
) | [virtual] |
Setter for Element's namespace URI.
IMPORT_C CSenElement * | SetParent | ( | CSenElement * | apParent | ) | [virtual] |
Sets the parent element to this element. Notice that the element is not automatically added as a child of the parent. Parent's AddElementL() should be called instead.
CSenElement * apParent |
IMPORT_C void | SetPrefixL | ( | const TDesC8 & | aPrefix | ) | [virtual] |
Setter for namespace prefix of this element.
const TDesC8 & aPrefix |
IMPORT_C void | WriteAsXMLToL | ( | RWriteStream & | aWriteStream | ) | [virtual] |
Element writes itself to a write stream using UTF-8 charset encoding.
RWriteStream & aWriteStream |
IMPORT_C void | WriteAttrToL | ( | RWriteStream & | aWriteStream, |
const TDesC8 & | aName, | |||
const TDesC8 & | aValue | |||
) | [protected, virtual] |
Helper function to write an attribute into a writestream.
RWriteStream & aWriteStream | writestream to write into |
const TDesC8 & aName | attribute name |
const TDesC8 & aValue | attribute value |
IMPORT_C void | WriteAttrsToL | ( | RWriteStream & | aWriteStream | ) | [protected, virtual] |
Writes element's attributes into a writestream.
RWriteStream & aWriteStream | writestream to write into |
IMPORT_C void | WriteContentToL | ( | RWriteStream & | aWriteStream | ) | [protected, virtual] |
Writes all element's content into a writestream.
RWriteStream & aWriteStream | writestream to write into |
IMPORT_C void | WriteElementsToL | ( | RWriteStream & | aWriteStream | ) | [protected, virtual] |
Writes all internal elements into a writestream.
RWriteStream & aWriteStream | writestream to write into |
IMPORT_C void | WriteNamespacesToL | ( | RWriteStream & | aWriteStream | ) | [virtual] |
Element writes its namespaces to a write stream using UTF-8 charset encoding.
RWriteStream & aWriteStream |
IMPORT_C TPtrC8 | WriteToBufL | ( | CBufBase & | aBuf | ) | [protected, virtual] |
Writes element into a dynamic buffer.
CBufBase & aBuf | a dynamic buffer where to append everything. |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.