class CXCFWEngine : public CActive |
XCFW Engine class Responsible for internalizing / externalizing XML files to and from a XCFW tree
Public Member Functions | |
---|---|
~CXCFWEngine () | |
IMPORT_C void | AttributeDetailsL (const TInt , TPtrC &, TPtrC &, TBool &) |
IMPORT_C void | AttributeDetailsL (const TInt , TPtrC &, TPtrC &) |
IMPORT_C void | CancelOperation () |
void | ComposeFileCompleteL () |
IMPORT_C TXCFWEngineState | CurrentState () |
IMPORT_C TBool | HasTextData () |
IMPORT_C void | LoadL ( MXCFWTree &, const TDesC &) |
IMPORT_C void | LoadL ( MXCFWTree &, const TDesC &, const TDesC &) |
IMPORT_C CXCFWEngine * | NewL ( MXCFWEngineObserver *) |
IMPORT_C TInt | NumAttributes () |
void | ParseFileCompleteL () |
IMPORT_C void | RegisterObjectFactoryL ( CGECOObjectFactoryBase *) |
IMPORT_C void | SaveL ( MXCFWTree &, const TDesC &) |
IMPORT_C void | SaveL ( MXCFWTree &, const TDesC &, const TDesC &) |
IMPORT_C void | TextDetailsL ( TPtrC &, TBool &) |
IMPORT_C TInt | UnRegisterObjectFactory ( CGECOObjectFactoryBase *) |
Protected Member Functions | |
---|---|
void | DoCancel () |
TInt | RunError ( TInt ) |
void | RunL () |
Private Member Functions | |
---|---|
CXCFWEngine ( MXCFWEngineObserver *) | |
void | AddCurrentTreeNodeToDOML () |
void | AddCurrentXMLNodeToTreeL () |
void | ConstructL () |
void | DOM2TreeNextCycleL () |
void | FreeResources () |
void | PrepareDTDPathL () |
void | PrepareEntityConverterAndSetActiveL () |
void | Tree2DOMNextCycleL () |
Public Member Enumerations | |
---|---|
enum |
TXCFWEngineState
{
EStateIdle = 0, EStateInitializingLoad , EStateLoadingFile , EStateInitializingSave , EStateSavingFile , EStateParsing , EStateConstructingDOM } |
Inherited Enumerations | |
---|---|
CActive:TPriority |
Private Attributes | |
---|---|
CMDXMLComposer * | iComposer |
CXCFWEntityConverter * | iConverter |
MXCFWNode * | iCurrentTreeNode |
CMDXMLNode * | iCurrentXMLNode |
HBufC * | iDTD |
CGECODefaultObjectFactory * | iDefaultFactory |
RFactoryArray | iFactoryList |
HBufC * | iFile |
RFs | iFileSystem |
CXCFWLocalizer * | iLocalizer |
HBufC * | iNodeText |
MXCFWEngineObserver * | iObserver |
CMDXMLParser * | iParser |
TXCFWEngineState | iState |
TXCFWEngineState | iStateByLastError |
MXCFWTree * | iTree |
CMDXMLDocument * | iXMLDoc |
Inherited Attributes | |
---|---|
CActive::iStatus |
CXCFWEngine | ( | MXCFWEngineObserver * | aObserver | ) | [private] |
C++ default constructor.
MXCFWEngineObserver * aObserver | Engine observer |
void | AddCurrentTreeNodeToDOML | ( | ) | [private] |
void | AddCurrentXMLNodeToTreeL | ( | ) | [private] |
IMPORT_C void | AttributeDetailsL | ( | const TInt | aIndex, |
TPtrC & | aAttributeName, | |||
TPtrC & | aAttributeValue, | |||
TBool & | aIsLocalized | |||
) |
From MGECOAttributeProvider . Returns attribute details for given index.
IMPORT_C void | AttributeDetailsL | ( | const TInt | aIndex, |
TPtrC & | aAttributeName, | |||
TPtrC & | aAttributeValue | |||
) |
From MGECOAttributeProvider . Returns attribute details for given index.
IMPORT_C void | CancelOperation | ( | ) |
void | ComposeFileCompleteL | ( | ) |
From MMDXMLComposerObserver . Called when DOM to XML composing is done.
IMPORT_C TXCFWEngineState | CurrentState | ( | ) |
void | DOM2TreeNextCycleL | ( | ) | [private] |
void | DoCancel | ( | ) | [protected, virtual] |
Implements cancellation of an outstanding request.
This function is called as part of the active object's Cancel() .
It must call the appropriate cancel function offered by the active object's asynchronous service provider. The asynchronous service provider's cancel is expected to act immediately.
DoCancel() must not wait for event completion; this is handled by Cancel() .
void | FreeResources | ( | ) | [private] |
IMPORT_C TBool | HasTextData | ( | ) |
From MGECOAttributeProvider . Returns ETrue if xml node has text data
IMPORT_C void | LoadL | ( | MXCFWTree & | aTree, |
const TDesC & | aFile | |||
) |
IMPORT_C void | LoadL | ( | MXCFWTree & | aTree, |
const TDesC & | aFile, | |||
const TDesC & | aDTDFile | |||
) |
IMPORT_C CXCFWEngine * | NewL | ( | MXCFWEngineObserver * | aObserver | ) | [static] |
Two-phased constructor.
MXCFWEngineObserver * aObserver |
IMPORT_C TInt | NumAttributes | ( | ) |
From MGECOAttributeProvider . Returns number of attributes for a xml tag.
void | ParseFileCompleteL | ( | ) |
From MMDXMLParserObserver . Called when XML to DOM parsing is done
void | PrepareDTDPathL | ( | ) | [private] |
Prepares DTD file path for localization file loading This function checks the DTD path from XML doctype declaration
void | PrepareEntityConverterAndSetActiveL | ( | ) | [private] |
IMPORT_C void | RegisterObjectFactoryL | ( | CGECOObjectFactoryBase * | aFactory | ) |
CGECOObjectFactoryBase * aFactory | Object factory to add. Engine will query factories for objects when constructing tree. |
void | RunL | ( | ) | [protected, virtual] |
Handles an active object's request completion event.
A derived class must provide an implementation to handle the completed request. If appropriate, it may issue another request.
The function is called by the active scheduler when a request completion event occurs, i.e. after the active scheduler's WaitForAnyRequest() function completes.
Before calling this active object's RunL() function, the active scheduler has:
1. decided that this is the highest priority active object with a completed request
2. marked this active object's request as complete (i.e. the request is no longer outstanding)
RunL() runs under a trap harness in the active scheduler. If it leaves, then the active scheduler calls RunError() to handle the leave.
Note that once the active scheduler's Start() function has been called, all user code is run under one of the program's active object's RunL() or RunError() functions.
CActiveScheduler::Start CActiveScheduler::Error CActiveScheduler::WaitForAnyRequest TRAPD
IMPORT_C void | SaveL | ( | MXCFWTree & | aTree, |
const TDesC & | aFile | |||
) |
IMPORT_C void | SaveL | ( | MXCFWTree & | aTree, |
const TDesC & | aFile, | |||
const TDesC & | aDTDFile | |||
) |
MXCFWTree & aTree | Target tree to construct XML from |
const TDesC & aFile | File to save the XML definition to |
const TDesC & aDTDFile | DTD to use for entity localization. This parameter overrides the possible DOCTYPE definition that was internalized to content tree when it was loaded from XML. |
IMPORT_C void | TextDetailsL | ( | TPtrC & | aText, |
TBool & | aIsLocalized | |||
) |
From MGECOAttributeProvider . Returns node / data object text and possible localization status for the text.
void | Tree2DOMNextCycleL | ( | ) | [private] |
IMPORT_C TInt | UnRegisterObjectFactory | ( | CGECOObjectFactoryBase * | aFactory | ) |
CGECOObjectFactoryBase * aFactory | Object factory to be removed |
EStateIdle = 0 | |
EStateInitializingLoad | |
EStateLoadingFile | |
EStateInitializingSave | |
EStateSavingFile | |
EStateParsing | |
EStateConstructingDOM |
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.