|
Unicorn XML Toolkit Version 1.00.00 |
|||||||||
� PREV CLASS �� NEXT CLASS | FRAMES��NO FRAMES | |||||||||
SUMMARY: � CONSTR �|� FUNCTION �|�DATA | DETAIL: � CONSTR �|� FUNCTION �|�DATA |
class CStreamInstance: public CBaseObject { public: CStreamInstance( CXmlObject *pXmlObject, const XObject &pPrototype, const Sax::XXmlStream &pStream=NULL); ~CStreamInstance(); public: CString Class(); public: XValue GetProperty( CContext &context, int nSelector); void PutProperty( CContext &context, int nSelector, const XValue &pValue); public: Sax::XXmlStream GetStream(); Sax::XXmlStream WrapStream(); public: void SetStream(const Sax::XXmlStream &pStream); };
The ECMAScript object representing an XML Stream instance.
Declaration of this class is made public in order
to allow development of custom ECMAScript extensions,
which provide objects, derived from XML streams,
(that is, objects, containing
XML Stream prototype in their prototype chains
and thus implementing
properties of XML streams).
Instances of such extension objects must be implemented
using classes derived from
CStreamInstance
.
For example, refer to the source code for the class
EcmaScriptDomPrivate::CReaderInstance
, implementing
DOM readers. This code can be found in the toolkit source
distribution, files
src\esxdom\domprv.h
and
src\esxdom\objrdr.cpp
.
Each ECMAScript stream instance may be associated with
an object of
Sax::CXmlStream
class;
in this case function properties
of the XML extension object are initially bound to
event processing functions of
the associated
Sax::CXmlStream
instance.
If the associated
Sax::CXmlStream
instance is not specified, then event processing function
properties of the ECMAScript stream instance
are initialized to void (doing nothing) functions.
Some XML stream object classes allow event processing function properties being overriden by ECMAScript programs in order to implement custom event processing.
CXmlObject, EcmaScript::CValue, EcmaScript::CObject, EcmaScript::CContext, Sax::CXmlStream
Constructor/Destructor Summary | |
CStreamInstance
(CXmlObject *pXmlObject, const XObject &pPrototype, const Sax::XXmlStream &pStream=NULL);
����������Constructs the XML stream instance. |
|
~CStreamInstance
();
����������Destroys the XML stream instance. |
Function Summary | |
CString
|
Class
();
����������Returns the value of the internal [[Class]]
property of this object. |
XValue
|
GetProperty
(CContext &context, int nSelector);
����������Returns value of the property corresponding to the specified selector. |
void
|
PutProperty
(CContext &context, int nSelector, const XValue &pValue);
����������Assigns value to the property with the specified selector. |
Sax::XXmlStream
|
GetStream
();
����������Returns an instance of Sax::CXmlStream
associated
with this object. |
Sax::XXmlStream
|
WrapStream
();
����������Returns an instance of Sax::CXmlStream
,
which wraps event processing ECMAScript function properties
associated with this object. |
void
|
SetStream
(const Sax::XXmlStream &pStream);
����������Sets the Sax::CXmlStream
instance associated
with this object. |
Constructor/Destructor Detail |
CStreamInstance( CXmlObject *pXmlObject, const XObject &pPrototype, const Sax::XXmlStream &pStream=NULL);
Constructs the XML stream instance.
pXmlObject
- the XML root objectpPrototype
- the object's prototype
(value of the internal
[[Prototype]]
property
for this object)pStream
- the instance of
Sax::CXmlStream
for this object;
NULL
if not
specified~CStreamInstance();
Destroys the XML stream instance.
Function Detail |
CString Class();
Returns the value of the internal
[[Class]]
property of this object.
This function returns
"XML.Stream"
.
It may be (and usually is) overriden by derived classes.
[[Class]]
property of this objectXValue GetProperty( CContext &context, int nSelector);
Returns value of the property corresponding to the specified selector.
context
- the execution contextnSelector
- the selectorvoid PutProperty( CContext &context, int nSelector, const XValue &pValue);
Assigns value to the property with the specified selector.
context
- the execution contextnSelector
- the selectorpValue
- value to assignSax::XXmlStream GetStream();
Returns an instance of
Sax::CXmlStream
associated
with this object.
Sax::CXmlStream
instance
associated with this object,
or
NULL
if none was specifiedSax::XXmlStream WrapStream();
Returns an instance of
Sax::CXmlStream
,
which wraps event processing ECMAScript function properties
associated with this object.
Sax::CXmlStream
instance,
which wraps event processing ECMAScript function properties
associated with this objectvoid SetStream(const Sax::XXmlStream &pStream);
Sets the
Sax::CXmlStream
instance associated
with this object.
This method can be used when
the
Sax::CXmlStream
object is not known
at the construction time.
pStream
- the
Sax::CXmlStream
object
|
Unicorn XML Toolkit Version 1.00.00 |
|||||||||
� PREV CLASS �� NEXT CLASS | FRAMES��NO FRAMES | |||||||||
SUMMARY: � CONSTR �|� FUNCTION �|�DATA | DETAIL: � CONSTR �|� FUNCTION �|�DATA |