C# Class SIL.FieldWorks.Discourse.DiscourseExporter

DiscourseExporter is an IVwEnv implementation which exports discourse data to an XmlWriter. Make one of these by creating an XmlTextWriter. Refactoring is probably in order to share more code with InterlinearExporter, or move common code down to CollectorEnv. This has been postponed in the interests of being able to release FW 5.2.1 without requiring changes to DLLs other than Discourse.
Inheritance: SIL.FieldWorks.Common.RootSites.CollectorEnv, IDisposable
Afficher le fichier Open project: sillsdev/FieldWorks Class Usage Examples

Private Properties

Свойство Type Description
GetText string
GetWsFromTsString int
MarkNeedsSpace void
UpdateWsList void
WriteLangAndContent void
WriteLanguages void
WriteMTMarker void
WriteStringProp void
WriteStringProp void
WriteStringVal void
WriteWordForm void

Méthodes publiques

Méthode Description
AddObj ( int hvoItem, IVwViewConstructor vc, int frag ) : void
AddObjProp ( int tag, IVwViewConstructor vc, int frag ) : void
AddObjVecItems ( int tag, IVwViewConstructor vc, int frag ) : void

overridden to maintain the frags array.

AddString ( ITsString tss ) : void
AddStringAltMember ( int tag, int ws, IVwViewConstructor _vwvc ) : void
AddStringProp ( int tag, IVwViewConstructor _vwvc ) : void
CloseTableCell ( ) : void
DiscourseExporter ( SIL.FieldWorks.FDO.FdoCache cache, XmlWriter writer, int hvoRoot, IVwViewConstructor vc, int wsLineNumber ) : System
Dispose ( ) : void
ExportDisplay ( ) : void
OpenTableCell ( int nRowSpan, int nColSpan ) : void

Here we build the main structure of the chart as a collection of cells. We have to be a bit tricky about generating the header.

set_IntProperty ( int tpt, int tpv, int nValue ) : void

Méthodes protégées

Méthode Description
CloseTheObject ( ) : void
Dispose ( bool fDisposing ) : void
OpenTheObject ( int hvo, int ihvo ) : void

Called whenever we start the display of an object, we currently use it to catch the start of a row, basedon the frag. Overriding OpenTableRow() might be more natural, but I was trying to minimize changes to other DLLs, and those routines are not currently virtual in the base class.

Private Methods

Méthode Description
GetText ( ITsString tss ) : string
GetWsFromTsString ( ITsString tss ) : int
MarkNeedsSpace ( string lit ) : void

Add attributes to an element just started to indicate whether white space is needed before or after the specified literal. The current implementation is simplistic, based on the few separators actually used in the discourse chart. The default is nothing added, indicating that white space IS needed.

UpdateWsList ( int ws ) : void
WriteLangAndContent ( int ws1, ITsString tss ) : void

Write a lang attribute identifying the string, then its content as the body of an element.

WriteLanguages ( ) : void

Write out the languages element. This should be used in InterlinearExporter, too.

WriteMTMarker ( ITsString tss ) : void
WriteStringProp ( int tag, string elementTag, int alt ) : void
WriteStringProp ( int tag, string elementTag, int alt, string extraAttr, string extraAttrVal ) : void
WriteStringVal ( string elementTag, int ws, ITsString tss, string extraAttr, string extraAttrVal ) : void
WriteWordForm ( string elementTag, ITsString tss, int ws, string extraAttr ) : void

Method Details

AddObj() public méthode

public AddObj ( int hvoItem, IVwViewConstructor vc, int frag ) : void
hvoItem int
vc IVwViewConstructor
frag int
Résultat void

AddObjProp() public méthode

public AddObjProp ( int tag, IVwViewConstructor vc, int frag ) : void
tag int
vc IVwViewConstructor
frag int
Résultat void

AddObjVecItems() public méthode

overridden to maintain the frags array.
public AddObjVecItems ( int tag, IVwViewConstructor vc, int frag ) : void
tag int
vc IVwViewConstructor
frag int
Résultat void

AddString() public méthode

public AddString ( ITsString tss ) : void
tss ITsString
Résultat void

AddStringAltMember() public méthode

public AddStringAltMember ( int tag, int ws, IVwViewConstructor _vwvc ) : void
tag int
ws int
_vwvc IVwViewConstructor
Résultat void

AddStringProp() public méthode

public AddStringProp ( int tag, IVwViewConstructor _vwvc ) : void
tag int
_vwvc IVwViewConstructor
Résultat void

CloseTableCell() public méthode

public CloseTableCell ( ) : void
Résultat void

CloseTheObject() protected méthode

protected CloseTheObject ( ) : void
Résultat void

DiscourseExporter() public méthode

public DiscourseExporter ( SIL.FieldWorks.FDO.FdoCache cache, XmlWriter writer, int hvoRoot, IVwViewConstructor vc, int wsLineNumber ) : System
cache SIL.FieldWorks.FDO.FdoCache
writer System.Xml.XmlWriter
hvoRoot int
vc IVwViewConstructor
wsLineNumber int
Résultat System

Dispose() public méthode

public Dispose ( ) : void
Résultat void

Dispose() protected méthode

protected Dispose ( bool fDisposing ) : void
fDisposing bool
Résultat void

ExportDisplay() public méthode

public ExportDisplay ( ) : void
Résultat void

OpenTableCell() public méthode

Here we build the main structure of the chart as a collection of cells. We have to be a bit tricky about generating the header.
public OpenTableCell ( int nRowSpan, int nColSpan ) : void
nRowSpan int
nColSpan int
Résultat void

OpenTheObject() protected méthode

Called whenever we start the display of an object, we currently use it to catch the start of a row, basedon the frag. Overriding OpenTableRow() might be more natural, but I was trying to minimize changes to other DLLs, and those routines are not currently virtual in the base class.
protected OpenTheObject ( int hvo, int ihvo ) : void
hvo int
ihvo int
Résultat void

set_IntProperty() public méthode

public set_IntProperty ( int tpt, int tpv, int nValue ) : void
tpt int
tpv int
nValue int
Résultat void