本文整理汇总了C++中CWStringDynamic::Wsz方法的典型用法代码示例。如果您正苦于以下问题:C++ CWStringDynamic::Wsz方法的具体用法?C++ CWStringDynamic::Wsz怎么用?C++ CWStringDynamic::Wsz使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CWStringDynamic
的用法示例。
在下文中一共展示了CWStringDynamic::Wsz方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CDXLNode
//---------------------------------------------------------------------------
// @function:
// CParseHandlerScalarCoerceToDomain::StartElement
//
// @doc:
// Processes a Xerces start element event
//
//---------------------------------------------------------------------------
void
CParseHandlerScalarCoerceToDomain::StartElement
(
const XMLCh* const, // xmlszUri,
const XMLCh* const xmlszLocalname,
const XMLCh* const, // xmlszQname
const Attributes& attrs
)
{
if(0 == XMLString::compareString(CDXLTokens::XmlstrToken(EdxltokenScalarCoerceToDomain), xmlszLocalname))
{
if (NULL != m_pdxln)
{
CWStringDynamic *pstr = CDXLUtils::PstrFromXMLCh(m_pphm->Pmm(), xmlszLocalname);
GPOS_RAISE(gpdxl::ExmaDXL, gpdxl::ExmiDXLUnexpectedTag, pstr->Wsz());
}
// parse and create scalar coerce
CDXLScalarCoerceToDomain *pdxlop = (CDXLScalarCoerceToDomain*) CDXLOperatorFactory::PdxlopCoerceToDomain(m_pphm->Pmm(), attrs);
m_pdxln = GPOS_NEW(m_pmp) CDXLNode(m_pmp, pdxlop);
// parse handler for child scalar node
CParseHandlerBase *pphChild = CParseHandlerFactory::Pph(m_pmp, CDXLTokens::XmlstrToken(EdxltokenScalar), m_pphm, this);
m_pphm->ActivateParseHandler(pphChild);
// store parse handler
this->Append(pphChild);
}
else
{
CWStringDynamic *pstr = CDXLUtils::PstrFromXMLCh(m_pphm->Pmm(), xmlszLocalname);
GPOS_RAISE(gpdxl::ExmaDXL, gpdxl::ExmiDXLUnexpectedTag, pstr->Wsz());
}
}
示例2: if
//---------------------------------------------------------------------------
// @function:
// CParseHandlerResult::StartElement
//
// @doc:
// Invoked by Xerces to process an opening tag
//
//---------------------------------------------------------------------------
void
CParseHandlerResult::StartElement
(
const XMLCh* const xmlszUri,
const XMLCh* const xmlszLocalname,
const XMLCh* const xmlszQname,
const Attributes& attrs
)
{
if (0 == XMLString::compareString(CDXLTokens::XmlstrToken(EdxltokenPhysicalResult), xmlszLocalname)
&& NULL == m_pdxlop)
{
SetupInitialHandlers();
}
else if (NULL != m_pdxlop)
{
// parse handler for child node
CParseHandlerBase *pphChild = CParseHandlerFactory::Pph(m_pmp, CDXLTokens::XmlstrToken(EdxltokenPhysical), m_pphm, this);
m_pphm->ActivateParseHandler(pphChild);
this->Append(pphChild);
pphChild->startElement(xmlszUri, xmlszLocalname, xmlszQname, attrs);
}
else
{
CWStringDynamic *pstr = CDXLUtils::PstrFromXMLCh(m_pphm->Pmm(), xmlszLocalname);
GPOS_RAISE(gpdxl::ExmaDXL, gpdxl::ExmiDXLUnexpectedTag, pstr->Wsz());
}
}
示例3:
//---------------------------------------------------------------------------
// @function:
// CParseHandlerProjElem::StartElement
//
// @doc:
// Invoked by Xerces to process an opening tag
//
//---------------------------------------------------------------------------
void
CParseHandlerProjElem::StartElement
(
const XMLCh* const, // xmlszUri,
const XMLCh* const xmlszLocalname,
const XMLCh* const, // xmlszQname
const Attributes& attrs
)
{
if(0 != XMLString::compareString(CDXLTokens::XmlstrToken(EdxltokenScalarProjElem), xmlszLocalname))
{
CWStringDynamic *pstr = CDXLUtils::PstrFromXMLCh(m_pphm->Pmm(), xmlszLocalname);
GPOS_RAISE(gpdxl::ExmaDXL, gpdxl::ExmiDXLUnexpectedTag, pstr->Wsz());
}
// parse and create proj elem operator
m_pdxlop = (CDXLScalarProjElem *) CDXLOperatorFactory::PdxlopProjElem(m_pphm->Pmm(), attrs);
// create and activate the parse handler for the child scalar expression node
CParseHandlerBase *pph = CParseHandlerFactory::Pph(m_pmp, CDXLTokens::XmlstrToken(EdxltokenScalar), m_pphm, this);
m_pphm->ActivateParseHandler(pph);
// store parse handler
this->Append(pph);
}
示例4: if
//---------------------------------------------------------------------------
// @function:
// CParseHandlerSortColList::StartElement
//
// @doc:
// Invoked by Xerces to process an opening tag
//
//---------------------------------------------------------------------------
void
CParseHandlerSortColList::StartElement
(
const XMLCh* const xmlszUri,
const XMLCh* const xmlszLocalname,
const XMLCh* const xmlszQname,
const Attributes& attrs
)
{
if(0 == XMLString::compareString(CDXLTokens::XmlstrToken(EdxltokenScalarSortColList), xmlszLocalname))
{
// start the sorting column list
m_pdxln = GPOS_NEW(m_pmp) CDXLNode (m_pmp, GPOS_NEW(m_pmp) CDXLScalarSortColList(m_pmp));
}
else if(0 == XMLString::compareString(CDXLTokens::XmlstrToken(EdxltokenScalarSortCol), xmlszLocalname))
{
// we must have seen a sorting col list already and initialized the sort col list node
GPOS_ASSERT(NULL != m_pdxln);
// start new sort column
CParseHandlerBase *pphSortCol = CParseHandlerFactory::Pph(m_pmp, CDXLTokens::XmlstrToken(EdxltokenScalarSortCol), m_pphm, this);
m_pphm->ActivateParseHandler(pphSortCol);
// store parse handler
this->Append(pphSortCol);
pphSortCol->startElement(xmlszUri, xmlszLocalname, xmlszQname, attrs);
}
else
{
CWStringDynamic *pstr = CDXLUtils::PstrFromXMLCh(m_pphm->Pmm(), xmlszLocalname);
GPOS_RAISE(gpdxl::ExmaDXL, gpdxl::ExmiDXLUnexpectedTag, pstr->Wsz());
}
}
示例5:
//---------------------------------------------------------------------------
// @function:
// CParseHandlerScalarSwitch::EndElement
//
// @doc:
// Invoked by Xerces to process a closing tag
//
//---------------------------------------------------------------------------
void
CParseHandlerScalarSwitch::EndElement
(
const XMLCh* const ,// xmlszUri
const XMLCh* const xmlszLocalname,
const XMLCh* const // xmlszQname
)
{
if (0 != XMLString::compareString(CDXLTokens::XmlstrToken(EdxltokenScalarSwitch), xmlszLocalname))
{
CWStringDynamic *pstr = CDXLUtils::PstrFromXMLCh(m_pphm->Pmm(), xmlszLocalname);
GPOS_RAISE(gpdxl::ExmaDXL, gpdxl::ExmiDXLUnexpectedTag, pstr->Wsz());
}
const ULONG ulChildren = this->UlLength();
GPOS_ASSERT(1 < ulChildren);
for (ULONG ul = 0; ul < ulChildren ; ul++)
{
CParseHandlerScalarOp *pphChild = dynamic_cast<CParseHandlerScalarOp *>((*this)[ul]);
AddChildFromParseHandler(pphChild);
}
// deactivate handler
m_pphm->DeactivateHandler();
}
示例6:
//---------------------------------------------------------------------------
// @function:
// CParseHandlerScalarSubPlanTestExpr::EndElement
//
// @doc:
// Processes a Xerces end element event
//
//---------------------------------------------------------------------------
void
CParseHandlerScalarSubPlanTestExpr::EndElement
(
const XMLCh* const, // xmlszUri,
const XMLCh* const xmlszLocalname,
const XMLCh* const // xmlszQname
)
{
if(0 != XMLString::compareString(CDXLTokens::XmlstrToken(EdxltokenScalarSubPlanTestExpr), xmlszLocalname) && NULL != m_pdxlnTestExpr)
{
CWStringDynamic *pstr = CDXLUtils::PstrFromXMLCh(m_pphm->Pmm(), xmlszLocalname);
GPOS_RAISE(gpdxl::ExmaDXL, gpdxl::ExmiDXLUnexpectedTag, pstr->Wsz());
}
if (0 < this->UlLength())
{
CParseHandlerScalarOp *pphChild = dynamic_cast<CParseHandlerScalarOp *>((*this)[0]);
if (NULL != pphChild->Pdxln())
{
m_pdxlnTestExpr = pphChild->Pdxln();
m_pdxlnTestExpr->AddRef();
}
}
// deactivate handler
m_pphm->DeactivateHandler();
}
示例7:
//---------------------------------------------------------------------------
// @function:
// CParseHandlerScalarNullTest::EndElement
//
// @doc:
// Processes a Xerces end element event
//
//---------------------------------------------------------------------------
void
CParseHandlerScalarNullTest::EndElement
(
const XMLCh* const, // xmlszUri,
const XMLCh* const xmlszLocalname,
const XMLCh* const // xmlszQname
)
{
if ((0 != XMLString::compareString(CDXLTokens::XmlstrToken(EdxltokenScalarIsNull), xmlszLocalname)) &&
(0 != XMLString::compareString(CDXLTokens::XmlstrToken(EdxltokenScalarIsNotNull), xmlszLocalname)))
{
CWStringDynamic *pstr = CDXLUtils::PstrFromXMLCh(m_pphm->Pmm(), xmlszLocalname);
GPOS_RAISE(gpdxl::ExmaDXL, gpdxl::ExmiDXLUnexpectedTag, pstr->Wsz());
}
GPOS_ASSERT(1 == this->UlLength());
// add constructed child from child parse handler
CParseHandlerScalarOp *pphChild = dynamic_cast<CParseHandlerScalarOp*>((*this)[0]);
AddChildFromParseHandler(pphChild);
// deactivate handler
m_pphm->DeactivateHandler();
}
示例8: if
//---------------------------------------------------------------------------
// @function:
// CParseHandlerWindowSpecList::StartElement
//
// @doc:
// Invoked by Xerces to process an opening tag
//
//---------------------------------------------------------------------------
void
CParseHandlerWindowSpecList::StartElement
(
const XMLCh* const xmlszUri,
const XMLCh* const xmlszLocalname,
const XMLCh* const xmlszQname,
const Attributes& attrs
)
{
if (0 == XMLString::compareString(CDXLTokens::XmlstrToken(EdxltokenWindowSpecList), xmlszLocalname))
{
m_pdrgpdxlws = GPOS_NEW(m_pmp) DrgPdxlws(m_pmp);
}
else if (0 == XMLString::compareString(CDXLTokens::XmlstrToken(EdxltokenWindowSpec), xmlszLocalname))
{
// we must have seen a window specification list already
GPOS_ASSERT(NULL != m_pdrgpdxlws);
// start new window specification element
CParseHandlerBase *pphWs =
CParseHandlerFactory::Pph(m_pmp, CDXLTokens::XmlstrToken(EdxltokenWindowSpec), m_pphm, this);
m_pphm->ActivateParseHandler(pphWs);
// store parse handler
this->Append(pphWs);
pphWs->startElement(xmlszUri, xmlszLocalname, xmlszQname, attrs);
}
else
{
CWStringDynamic *pstr = CDXLUtils::PstrFromXMLCh(m_pphm->Pmm(), xmlszLocalname);
GPOS_RAISE(gpdxl::ExmaDXL, gpdxl::ExmiDXLUnexpectedTag, pstr->Wsz());
}
}
示例9:
//---------------------------------------------------------------------------
// @function:
// CParseHandlerPhysicalCTEProducer::EndElement
//
// @doc:
// Invoked by Xerces to process a closing tag
//
//---------------------------------------------------------------------------
void
CParseHandlerPhysicalCTEProducer::EndElement
(
const XMLCh* const, // xmlszUri,
const XMLCh* const xmlszLocalname,
const XMLCh* const // xmlszQname
)
{
if (0 != XMLString::compareString(CDXLTokens::XmlstrToken(EdxltokenPhysicalCTEProducer), xmlszLocalname))
{
CWStringDynamic *pstr = CDXLUtils::PstrFromXMLCh(m_pphm->Pmm(), xmlszLocalname);
GPOS_RAISE(gpdxl::ExmaDXL, gpdxl::ExmiDXLUnexpectedTag, pstr->Wsz());
}
GPOS_ASSERT(NULL != m_pdxln);
CParseHandlerProperties *pphProp = dynamic_cast<CParseHandlerProperties *>((*this)[0]);
CParseHandlerProjList *pphPrL = dynamic_cast<CParseHandlerProjList*>((*this)[1]);
CParseHandlerPhysicalOp *pphChild = dynamic_cast<CParseHandlerPhysicalOp *>((*this)[2]);
// set physical properties
CParseHandlerUtils::SetProperties(m_pdxln, pphProp);
// add constructed children
AddChildFromParseHandler(pphPrL);
AddChildFromParseHandler(pphChild);
#ifdef GPOS_DEBUG
m_pdxln->Pdxlop()->AssertValid(m_pdxln, false /* fValidateChildren */);
#endif // GPOS_DEBUG
m_pphm->DeactivateHandler();
}
示例10: if
//---------------------------------------------------------------------------
// @function:
// CParseHandlerColStatsBucket::EndElement
//
// @doc:
// Invoked by Xerces to process a closing tag
//
//---------------------------------------------------------------------------
void
CParseHandlerColStatsBucket::EndElement
(
const XMLCh* const, // xmlszUri,
const XMLCh* const xmlszLocalname,
const XMLCh* const // xmlszQname
)
{
if (0 == XMLString::compareString(CDXLTokens::XmlstrToken(EdxltokenColumnStatsBucket), xmlszLocalname))
{
m_pdxlbucket = GPOS_NEW(m_pmp) CDXLBucket(m_pdxldatumLower, m_pdxldatumUpper, m_fLowerClosed, m_fUpperClosed, m_dFrequency, m_dDistinct);
// deactivate handler
m_pphm->DeactivateHandler();
}
else if (0 != XMLString::compareString(CDXLTokens::XmlstrToken(EdxltokenStatsBucketLowerBound), xmlszLocalname) &&
0 != XMLString::compareString(CDXLTokens::XmlstrToken(EdxltokenStatsBucketUpperBound), xmlszLocalname))
{
CWStringDynamic *pstr = CDXLUtils::PstrFromXMLCh(m_pphm->Pmm(), xmlszLocalname);
GPOS_RAISE
(
gpdxl::ExmaDXL,
gpdxl::ExmiDXLUnexpectedTag,
pstr->Wsz()
);
}
}
示例11: CDXLScalarBitmapIndexProbe
//---------------------------------------------------------------------------
// @function:
// CParseHandlerScalarBitmapIndexProbe::EndElement
//
// @doc:
// Invoked by Xerces to process a closing tag
//
//---------------------------------------------------------------------------
void
CParseHandlerScalarBitmapIndexProbe::EndElement
(
const XMLCh* const, // xmlszUri
const XMLCh* const xmlszLocalname,
const XMLCh* const // xmlszQname
)
{
if (0 != XMLString::compareString
(
CDXLTokens::XmlstrToken(EdxltokenScalarBitmapIndexProbe),
xmlszLocalname
))
{
CWStringDynamic *pstr = CDXLUtils::PstrFromXMLCh(m_pphm->Pmm(), xmlszLocalname);
GPOS_RAISE(gpdxl::ExmaDXL, gpdxl::ExmiDXLUnexpectedTag, pstr->Wsz());
}
// construct node from the created child nodes
CParseHandlerIndexCondList *pphIdxCondList = dynamic_cast<CParseHandlerIndexCondList *>((*this)[0]);
CParseHandlerIndexDescr *pphIdxD = dynamic_cast<CParseHandlerIndexDescr *>((*this)[1]);
CDXLIndexDescr *pdxlid = pphIdxD->Pdxlid();
pdxlid->AddRef();
CDXLScalar *pdxlop = GPOS_NEW(m_pmp) CDXLScalarBitmapIndexProbe(m_pmp, pdxlid);
m_pdxln = GPOS_NEW(m_pmp) CDXLNode(m_pmp, pdxlop);
// add children
AddChildFromParseHandler(pphIdxCondList);
// deactivate handler
m_pphm->DeactivateHandler();
}
示例12: if
//---------------------------------------------------------------------------
// @function:
// CParseHandlerMetadataIdList::EndElement
//
// @doc:
// Invoked by Xerces to process a closing tag
//
//---------------------------------------------------------------------------
void
CParseHandlerMetadataIdList::EndElement
(
const XMLCh* const, // xmlszUri,
const XMLCh* const xmlszLocalname,
const XMLCh* const // xmlszQname
)
{
if (0 == XMLString::compareString(CDXLTokens::XmlstrToken(EdxltokenTriggers), xmlszLocalname) ||
0 == XMLString::compareString(CDXLTokens::XmlstrToken(EdxltokenPartitions), xmlszLocalname)||
0 == XMLString::compareString(CDXLTokens::XmlstrToken(EdxltokenCheckConstraints), xmlszLocalname) ||
0 == XMLString::compareString(CDXLTokens::XmlstrToken(EdxltokenOpClasses), xmlszLocalname))
{
// end the index or partition metadata id list
GPOS_ASSERT(NULL != m_pdrgpmdid);
// deactivate handler
m_pphm->DeactivateHandler();
}
else if (!FSupportedElem(xmlszLocalname))
{
CWStringDynamic *pstr = CDXLUtils::PstrFromXMLCh(m_pphm->Pmm(), xmlszLocalname);
GPOS_RAISE(gpdxl::ExmaDXL, gpdxl::ExmiDXLUnexpectedTag, pstr->Wsz());
}
}
示例13:
//---------------------------------------------------------------------------
// @function:
// CParseHandlerScalarComp::StartElement
//
// @doc:
// Processes a Xerces start element event
//
//---------------------------------------------------------------------------
void
CParseHandlerScalarComp::StartElement
(
const XMLCh* const, // xmlszUri,
const XMLCh* const xmlszLocalname,
const XMLCh* const, // xmlszQname
const Attributes& attrs
)
{
if(0 != XMLString::compareString(CDXLTokens::XmlstrToken(EdxltokenScalarComp), xmlszLocalname))
{
CWStringDynamic *pstr = CDXLUtils::PstrFromXMLCh(m_pphm->Pmm(), xmlszLocalname);
GPOS_RAISE(gpdxl::ExmaDXL, gpdxl::ExmiDXLUnexpectedTag, pstr->Wsz());
}
// parse and create comparison operator
m_pdxlop = (CDXLScalarComp *) CDXLOperatorFactory::PdxlopScalarCmp(m_pphm->Pmm(), attrs);
// create and activate the parse handler for the children nodes in reverse
// order of their expected appearance
// parse handler for right scalar node
CParseHandlerBase *pphRight = CParseHandlerFactory::Pph(m_pmp, CDXLTokens::XmlstrToken(EdxltokenScalar), m_pphm, this);
m_pphm->ActivateParseHandler(pphRight);
// parse handler for left scalar node
CParseHandlerBase *pphLeft = CParseHandlerFactory::Pph(m_pmp, CDXLTokens::XmlstrToken(EdxltokenScalar), m_pphm, this);
m_pphm->ActivateParseHandler(pphLeft);
// store parse handlers
this->Append(pphLeft);
this->Append(pphRight);
}
示例14:
//---------------------------------------------------------------------------
// @function:
// CParseHandlerScalarSubPlanParamList::EndElement
//
// @doc:
// Processes a Xerces end element event
//
//---------------------------------------------------------------------------
void
CParseHandlerScalarSubPlanParamList::EndElement
(
const XMLCh* const, // xmlszUri,
const XMLCh* const xmlszLocalname,
const XMLCh* const // xmlszQname
)
{
if(0 != XMLString::compareString(CDXLTokens::XmlstrToken(EdxltokenScalarSubPlanParamList), xmlszLocalname) && NULL != m_pdxln)
{
CWStringDynamic *pstr = CDXLUtils::PstrFromXMLCh(m_pphm->Pmm(), xmlszLocalname);
GPOS_RAISE(gpdxl::ExmaDXL, gpdxl::ExmiDXLUnexpectedTag, pstr->Wsz());
}
const ULONG ulSize = this->UlLength();
// add constructed children from child parse handlers
for (ULONG ul = 0; ul < ulSize; ul++)
{
CParseHandlerScalarSubPlanParam *pphParam = dynamic_cast<CParseHandlerScalarSubPlanParam *>((*this)[ul]);
CDXLColRef *pdxlcr = pphParam->Pdxlcr();
IMDId *pmdid = pphParam->Pmdid();
pdxlcr->AddRef();
pmdid->AddRef();
m_pdrgdxlcr->Append(pdxlcr);
m_pdrgmdid->Append(pmdid);
}
// deactivate handler
m_pphm->DeactivateHandler();
}
示例15: if
//---------------------------------------------------------------------------
// @function:
// CParseHandlerScalarSubqueryExists::StartElement
//
// @doc:
// Invoked by Xerces to process an opening tag
//
//---------------------------------------------------------------------------
void
CParseHandlerScalarSubqueryExists::StartElement
(
const XMLCh* const, // xmlszUri,
const XMLCh* const xmlszLocalname,
const XMLCh* const, // xmlszQname
const Attributes& // attrs
)
{
GPOS_ASSERT(NULL == m_pdxlop);
if(0 == XMLString::compareString(CDXLTokens::XmlstrToken(EdxltokenScalarSubqueryExists), xmlszLocalname))
{
m_pdxlop = GPOS_NEW(m_pmp) CDXLScalarSubqueryExists(m_pmp);
}
else if (0 == XMLString::compareString(CDXLTokens::XmlstrToken(EdxltokenScalarSubqueryNotExists), xmlszLocalname))
{
m_pdxlop = GPOS_NEW(m_pmp) CDXLScalarSubqueryNotExists(m_pmp);
}
else
{
CWStringDynamic *pstr = CDXLUtils::PstrFromXMLCh(m_pphm->Pmm(), xmlszLocalname);
GPOS_RAISE(gpdxl::ExmaDXL, gpdxl::ExmiDXLUnexpectedTag, pstr->Wsz());
}
// parse handler for the child node
CParseHandlerBase *pphChild = CParseHandlerFactory::Pph(m_pmp, CDXLTokens::XmlstrToken(EdxltokenLogical), m_pphm, this);
m_pphm->ActivateParseHandler(pphChild);
// store child parse handler in array
this->Append(pphChild);
}