Xml::TParserImpl Class Reference
The TParserImpl class hides the implementation of the CParser. It is responsible for building and maintaining the list of plugins in the parsing chain, and has ownership of several key objects within the framework.
Nested Classes and Structures
Constructor & Destructor Documentation
TParserImpl()
Default constructor
- Post-condition
- This object is properly constructed.
TParserImpl(const TParserImpl &)
Member Functions Documentation
AddPreloadedDictionaryL(const TDesC8 &)
void | AddPreloadedDictionaryL | ( | const TDesC8 & | aPublicId | ) | |
BuildChainL(MContentHandler &, const RContentProcessorUids &)
This method builds the chain of plugins, so that information may flow down the chain.
The first in the chain is the parser, the last is the client.
Close()
This method cleans up the object before destruction. It releases all resources in accordance to the R Class pattern.
The framework will Close the StringDictionaryCollection and if owned will delete it.
- Post-condition
- This object may be allowed to go out of scope.
ConstructParserL(const CMatchData &, MContentHandler &)
This method constructs a MParser derived object.
-
leave
- KErrXmlParserPluginNotFound If ECom fails to find the object a leave occurs.
-
leave
- KErrArgument If CMatchData is lacking mandatory mime type field.
Parameters
const CMatchData & aMatchData | Detailed criteria for parser resolution. |
MContentHandler & aCallback | client to pass data to. |
ConstructPluginInReverseL(const TUid &, MContentHandler &)
This method constructs a CContentProcessor and places it in reverse order in the chain.
-
leave
- KErrXmlPluginNotFound If ECom fails to find the object a leave occurs.
Parameters
const TUid & aImplementationUid | The implementation uid of the plugin. |
MContentHandler & aCallback | client to pass data to. |
DestroyChain()
void | DestroyChain | ( | ) | [private] |
Destroys the client and the chain of plugins not including the parser.
- Post-condition
- The chain and client are destroyed and parsing cannot take place.
DestroyContentProcessorPtrMapping(TAny *)
void | DestroyContentProcessorPtrMapping | ( | TAny * | aPtr | ) | [private, static] |
Tidy memory associated with this object.
Parameters
TAny * aPtr | The ContentProcessor pointer. |
IsFeatureEnabled(TInt)
TBool
| IsFeatureEnabled | ( | TInt | aParserFeature | ) | const |
OpenL(const CMatchData &, MContentHandler &)
This method opens and sets all the objects contents. The StringDictionaryCollection is created and Opened.
- Pre-condition
- The object has just been constructed and no other values have been set.
- Post-condition
- The objects members have been set to the values given.
Parameters
const CMatchData & aMatchData | Detailed criteria for parser resolution. |
MContentHandler & aCallback | client to pass data to. |
ParseChunkL(const TDesC8 &)
void | ParseChunkL | ( | const TDesC8 & | aChunk | ) | |
This method starts the parser parsing a descriptor. The descriptor does not contain the last part of the document.
- Pre-condition
- OpenL has been called
Parameters
const TDesC8 & aChunk | the chunk to parse - not the last chunk |
ParseFileL(RFs &, const TDesC &)
void | ParseFileL | ( | RFs & | aFs, |
| const TDesC & | aFilename |
| ) | |
ParseLastChunkL(const TDesC8 &)
void | ParseLastChunkL | ( | const TDesC8 & | aFinalChunk | ) | |
This method starts the parser parsing a descriptor. The descriptor contains the last part of the document.
- Pre-condition
- OpenL has been called
Parameters
const TDesC8 & aFinalChunk | the final chunk to parse |
SetContentHandler(MContentHandler &)
Allows the user to set/change the client for this parse session.
- Pre-condition
- OpenL has been called
Parameters
MContentHandler & aCallback | the client at the end of the callback chain that is to receive the parsed document information. |
SetMimeTypeL(const CMatchData &)
void | SetMimeTypeL | ( | const CMatchData & | aCriteria | ) | |
Allows the user to set/change the parser mime type used for this parse session.
- Pre-condition
- OpenL has been called
Parameters
const CMatchData & aCriteria | |
SetProcessorChainL(const RContentProcessorUids &)
Allows the user to change the client and set the plugin chain for this parse session.
- Pre-condition
- OpenL has been called
Parameters
const RContentProcessorUids & aPlugins | a list of plugin implementation uids that make up the callback chain. |
StringDictionaryCollection()
operator=(const TParserImpl &)
Member Data Documentation
CCharSetConverter * iCharSetConverter
MContentHandler * iClient
CMatchData iCurrentParserMatchData
CMatchData | iCurrentParserMatchData | [private] |
CMatchData iDefParserMatchData
CMatchData | iDefParserMatchData | [private] |
RPointerArray< TDtorContentProcessorPtrMapping > iDtorKeyAndPluginList
The collection of MContentProcessor pointers and Dtor keys that make up the chain of command. The chain order is determined by the the index, 0 being the first plugin in the chain.
RElementStack
iElementStack
The common element stack for this collection of plugins.
TUid
iParserDtorKey
TUid
| iParserDtorKey | [private] |
RStringDictionaryCollection * iStringDictionaryCollection
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.