本文整理汇总了C++中CWStringDynamic类的典型用法代码示例。如果您正苦于以下问题:C++ CWStringDynamic类的具体用法?C++ CWStringDynamic怎么用?C++ CWStringDynamic使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CWStringDynamic类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
//---------------------------------------------------------------------------
// @function:
// CParseHandlerQuery::StartElement
//
// @doc:
// Invoked by Xerces to process an opening tag
//
//---------------------------------------------------------------------------
void
CParseHandlerQuery::StartElement
(
const XMLCh* const, // xmlszUri,
const XMLCh* const xmlszLocalname,
const XMLCh* const, // xmlszQname
const Attributes& // attrs
)
{
if(0 != XMLString::compareString(CDXLTokens::XmlstrToken(EdxltokenQuery), xmlszLocalname))
{
CWStringDynamic *pstr = CDXLUtils::PstrFromXMLCh(m_pphm->Pmm(), xmlszLocalname);
GPOS_RAISE(gpdxl::ExmaDXL, gpdxl::ExmiDXLUnexpectedTag, pstr->Wsz());
}
GPOS_ASSERT(NULL != m_pmp);
// create parse handler for the query output node
CParseHandlerBase *pphQueryOutput = CParseHandlerFactory::Pph(m_pmp, CDXLTokens::XmlstrToken(EdxltokenQueryOutput), m_pphm, this);
// create parse handler for the CTE list
CParseHandlerBase *pphCTE = CParseHandlerFactory::Pph(m_pmp, CDXLTokens::XmlstrToken(EdxltokenCTEList), m_pphm, this);
// create a parse handler for logical nodes
CParseHandlerBase *pph = CParseHandlerFactory::Pph(m_pmp, CDXLTokens::XmlstrToken(EdxltokenLogical), m_pphm, this);
m_pphm->ActivateParseHandler(pph);
m_pphm->ActivateParseHandler(pphCTE);
m_pphm->ActivateParseHandler(pphQueryOutput);
// store parse handlers
this->Append(pphQueryOutput);
this->Append(pphCTE);
this->Append(pph);
}
示例2: CDXLNode
//---------------------------------------------------------------------------
// @function:
// CParseHandlerAssert::EndElement
//
// @doc:
// Invoked by Xerces to process a closing tag
//
//---------------------------------------------------------------------------
void
CParseHandlerAssert::EndElement
(
const XMLCh* const, // xmlszUri,
const XMLCh* const xmlszLocalname,
const XMLCh* const // xmlszQname
)
{
if(0 != XMLString::compareString(CDXLTokens::XmlstrToken(EdxltokenPhysicalAssert), xmlszLocalname))
{
CWStringDynamic *pstr = CDXLUtils::PstrFromXMLCh(m_pphm->Pmm(), xmlszLocalname);
GPOS_RAISE(gpdxl::ExmaDXL, gpdxl::ExmiDXLUnexpectedTag, pstr->Wsz());
}
// construct node from the created child nodes
CParseHandlerProperties *pphProp = dynamic_cast<CParseHandlerProperties *>((*this)[0]);
CParseHandlerProjList *pphPrL = dynamic_cast<CParseHandlerProjList*>((*this)[1]);
CParseHandlerScalarAssertConstraintList *pphAssertPredicate = dynamic_cast<CParseHandlerScalarAssertConstraintList *>((*this)[2]);
CParseHandlerPhysicalOp *pphChild = dynamic_cast<CParseHandlerPhysicalOp*>((*this)[3]);
m_pdxln = GPOS_NEW(m_pmp) CDXLNode(m_pmp, m_pdxlop);
CParseHandlerUtils::SetProperties(m_pdxln, pphProp);
// add constructed children
AddChildFromParseHandler(pphPrL);
AddChildFromParseHandler(pphAssertPredicate);
AddChildFromParseHandler(pphChild);
#ifdef GPOS_DEBUG
m_pdxlop->AssertValid(m_pdxln, false /* fValidateChildren */);
#endif // GPOS_DEBUG
// deactivate handler
m_pphm->DeactivateHandler();
}
示例3: CDXLNode
//---------------------------------------------------------------------------
// @function:
// CParseHandlerDistinctComp::EndElement
//
// @doc:
// Processes a Xerces end element event
//
//---------------------------------------------------------------------------
void
CParseHandlerDistinctComp::EndElement
(
const XMLCh* const, // xmlszUri,
const XMLCh* const xmlszLocalname,
const XMLCh* const // xmlszQname
)
{
if(0 != XMLString::compareString(CDXLTokens::XmlstrToken(EdxltokenScalarDistinctComp), xmlszLocalname))
{
CWStringDynamic *pstr = CDXLUtils::PstrFromXMLCh(m_pphm->Pmm(), xmlszLocalname);
GPOS_RAISE(gpdxl::ExmaDXL, gpdxl::ExmiDXLUnexpectedTag, pstr->Wsz());
}
// construct node from the created child nodes
m_pdxln = GPOS_NEW(m_pmp) CDXLNode(m_pmp, m_pdxlop);
CParseHandlerScalarOp *pphLeft = dynamic_cast<CParseHandlerScalarOp *>((*this)[0]);
CParseHandlerScalarOp *pphRight = dynamic_cast<CParseHandlerScalarOp *>((*this)[1]);
// add constructed children
AddChildFromParseHandler(pphLeft);
AddChildFromParseHandler(pphRight);
// deactivate handler
m_pphm->DeactivateHandler();
}
示例4: GPOS_NEW
//---------------------------------------------------------------------------
// @function:
// CParseHandlerLogicalSelect::StartElement
//
// @doc:
// Invoked by Xerces to process an opening tag
//
//---------------------------------------------------------------------------
void
CParseHandlerLogicalSelect::StartElement
(
const XMLCh* const, // xmlszUri,
const XMLCh* const xmlszLocalname,
const XMLCh* const, // xmlszQname
const Attributes& //attrs
)
{
if(0 == XMLString::compareString(CDXLTokens::XmlstrToken(EdxltokenLogicalSelect), xmlszLocalname))
{
m_pdxln = GPOS_NEW(m_pmp) CDXLNode(m_pmp, GPOS_NEW(m_pmp) CDXLLogicalSelect(m_pmp));
// create child node parsers
// parse handler for logical operator
CParseHandlerBase *pphChild = CParseHandlerFactory::Pph(m_pmp, CDXLTokens::XmlstrToken(EdxltokenLogical), m_pphm, this);
m_pphm->ActivateParseHandler(pphChild);
// parse handler for the scalar condition
CParseHandlerBase *pphOp = CParseHandlerFactory::Pph(m_pmp, CDXLTokens::XmlstrToken(EdxltokenScalar), m_pphm, this);
m_pphm->ActivateParseHandler(pphOp);
// store child parse handler in array
this->Append(pphOp);
this->Append(pphChild);
}
else
{
CWStringDynamic *pstr = CDXLUtils::PstrFromXMLCh(m_pphm->Pmm(), xmlszLocalname);
GPOS_RAISE(gpdxl::ExmaDXL, gpdxl::ExmiDXLUnexpectedTag, pstr->Wsz());
}
}
示例5:
//---------------------------------------------------------------------------
// @function:
// CParseHandlerLogicalInsert::StartElement
//
// @doc:
// Invoked by Xerces to process an opening tag
//
//---------------------------------------------------------------------------
void
CParseHandlerLogicalInsert::StartElement
(
const XMLCh* const, // xmlszUri,
const XMLCh* const xmlszLocalname,
const XMLCh* const, // xmlszQname
const Attributes &attrs
)
{
if(0 != XMLString::compareString(CDXLTokens::XmlstrToken(EdxltokenLogicalInsert), xmlszLocalname))
{
CWStringDynamic *pstr = CDXLUtils::PstrFromXMLCh(m_pphm->Pmm(), xmlszLocalname);
GPOS_RAISE(gpdxl::ExmaDXL, gpdxl::ExmiDXLUnexpectedTag, pstr->Wsz());
}
const XMLCh *xmlszSourceColIds = CDXLOperatorFactory::XmlstrFromAttrs(attrs, EdxltokenInsertCols, EdxltokenLogicalInsert);
m_pdrgpul = CDXLOperatorFactory::PdrgpulFromXMLCh(m_pphm->Pmm(), xmlszSourceColIds, EdxltokenInsertCols, EdxltokenLogicalInsert);
// create child node parsers
// parse handler for logical operator
CParseHandlerBase *pphChild = CParseHandlerFactory::Pph(m_pmp, CDXLTokens::XmlstrToken(EdxltokenLogical), m_pphm, this);
m_pphm->ActivateParseHandler(pphChild);
//parse handler for the table descriptor
CParseHandlerBase *pphTabDesc = CParseHandlerFactory::Pph(m_pmp, CDXLTokens::XmlstrToken(EdxltokenTableDescr), m_pphm, this);
m_pphm->ActivateParseHandler(pphTabDesc);
// store child parse handler in array
this->Append(pphTabDesc);
this->Append(pphChild);
}
示例6: AddChildFromParseHandler
//---------------------------------------------------------------------------
// @function:
// CParseHandlerLogicalSelect::EndElement
//
// @doc:
// Invoked by Xerces to process a closing tag
//
//---------------------------------------------------------------------------
void
CParseHandlerLogicalSelect::EndElement
(
const XMLCh* const, // xmlszUri,
const XMLCh* const xmlszLocalname,
const XMLCh* const // xmlszQname
)
{
if(0 != XMLString::compareString(CDXLTokens::XmlstrToken(EdxltokenLogicalSelect), xmlszLocalname))
{
CWStringDynamic *pstr = CDXLUtils::PstrFromXMLCh(m_pphm->Pmm(), xmlszLocalname);
GPOS_RAISE(gpdxl::ExmaDXL, gpdxl::ExmiDXLUnexpectedTag, pstr->Wsz());
}
GPOS_ASSERT(NULL != m_pdxln );
CParseHandlerScalarOp *pphOp = dynamic_cast<CParseHandlerScalarOp*>((*this)[0]);
CParseHandlerLogicalOp *pphChild = dynamic_cast<CParseHandlerLogicalOp*>((*this)[1]);
AddChildFromParseHandler(pphOp);
AddChildFromParseHandler(pphChild);
#ifdef GPOS_DEBUG
m_pdxln->Pdxlop()->AssertValid(m_pdxln, false /* fValidateChildren */);
#endif // GPOS_DEBUG
// deactivate handler
m_pphm->DeactivateHandler();
}
示例7: GPOS_ASSERT
//---------------------------------------------------------------------------
// @function:
// CParseHandlerStatsBound::StartElement
//
// @doc:
// Invoked by Xerces to process an opening tag
//
//---------------------------------------------------------------------------
void
CParseHandlerStatsBound::StartElement
(
const XMLCh* const,// xmlszUri,
const XMLCh* const xmlszLocalname,
const XMLCh* const,// xmlszQname,
const Attributes& attrs
)
{
if(0 == XMLString::compareString(CDXLTokens::XmlstrToken(EdxltokenStatsBucketLowerBound), xmlszLocalname)
|| 0 == XMLString::compareString(CDXLTokens::XmlstrToken(EdxltokenStatsBucketUpperBound), xmlszLocalname))
{
GPOS_ASSERT(NULL == m_pdxldatum);
// translate the datum and add it to the datum array
CDXLDatum *pdxldatum = CDXLOperatorFactory::Pdxldatum(m_pphm->Pmm(), attrs, EdxltokenDatum);
m_pdxldatum = pdxldatum;
if (0 == XMLString::compareString(CDXLTokens::XmlstrToken(EdxltokenStatsBucketLowerBound), xmlszLocalname))
{
m_fStatsBoundClosed = CDXLOperatorFactory::FValueFromAttrs(m_pphm->Pmm(), attrs, EdxltokenStatsBoundClosed, EdxltokenStatsBucketLowerBound);
}
else
{
m_fStatsBoundClosed = CDXLOperatorFactory::FValueFromAttrs(m_pphm->Pmm(), attrs, EdxltokenStatsBoundClosed, EdxltokenStatsBucketUpperBound);
}
}
else
{
CWStringDynamic *pstr = CDXLUtils::PstrFromXMLCh(m_pphm->Pmm(), xmlszLocalname);
GPOS_RAISE(gpdxl::ExmaDXL, gpdxl::ExmiDXLUnexpectedTag, pstr->Wsz());
}
}
示例8:
//---------------------------------------------------------------------------
// @function:
// CParseHandlerHint::StartElement
//
// @doc:
// Invoked by Xerces to process an opening tag
//
//---------------------------------------------------------------------------
void
CParseHandlerHint::StartElement
(
const XMLCh* const , //xmlszUri,
const XMLCh* const xmlszLocalname,
const XMLCh* const , //xmlszQname,
const Attributes& attrs
)
{
if (0 != XMLString::compareString(CDXLTokens::XmlstrToken(EdxltokenHint), xmlszLocalname))
{
CWStringDynamic *pstr = CDXLUtils::PstrFromXMLCh(m_pphm->Pmm(), xmlszLocalname);
GPOS_RAISE(gpdxl::ExmaDXL, gpdxl::ExmiDXLUnexpectedTag, pstr->Wsz());
}
// parse hint configuration options
ULONG ulMinNumOfPartsToRequireSortOnInsert = CDXLOperatorFactory::UlValueFromAttrs(m_pphm->Pmm(), attrs, EdxltokenMinNumOfPartsToRequireSortOnInsert, EdxltokenHint);
ULONG ulJoinArityForAssociativityCommutativity = CDXLOperatorFactory::UlValueFromAttrs(m_pphm->Pmm(), attrs, EdxltokenJoinArityForAssociativityCommutativity, EdxltokenHint, true, INT_MAX);
ULONG ulArrayExpansionThreshold = CDXLOperatorFactory::UlValueFromAttrs(m_pphm->Pmm(), attrs, EdxltokenArrayExpansionThreshold, EdxltokenHint, true, INT_MAX);
ULONG ulJoinOrderDPThreshold = CDXLOperatorFactory::UlValueFromAttrs(m_pphm->Pmm(), attrs, EdxltokenJoinOrderDPThreshold, EdxltokenHint, true, JOIN_ORDER_DP_THRESHOLD);
ULONG ulBroadcastThreshold = CDXLOperatorFactory::UlValueFromAttrs(m_pphm->Pmm(), attrs, EdxltokenBroadcastThreshold, EdxltokenHint, true, BROADCAST_THRESHOLD);
ULONG fEnforceConstraintsOnDML = CDXLOperatorFactory::FValueFromAttrs(m_pphm->Pmm(), attrs, EdxltokenEnforceConstraintsOnDML, EdxltokenHint, true, true);
m_phint = GPOS_NEW(m_pmp) CHint
(
ulMinNumOfPartsToRequireSortOnInsert,
ulJoinArityForAssociativityCommutativity,
ulArrayExpansionThreshold,
ulJoinOrderDPThreshold,
ulBroadcastThreshold,
fEnforceConstraintsOnDML
);
}
示例9: GPOS_NEW
//---------------------------------------------------------------------------
// @function:
// CParseHandlerSearchStrategy::StartElement
//
// @doc:
// Invoked by Xerces to process an opening tag
//
//---------------------------------------------------------------------------
void
CParseHandlerSearchStrategy::StartElement
(
const XMLCh* const xmlstrUri,
const XMLCh* const xmlstrLocalname,
const XMLCh* const xmlstrQname,
const Attributes& attrs
)
{
if (0 == XMLString::compareString(CDXLTokens::XmlstrToken(EdxltokenSearchStrategy), xmlstrLocalname))
{
m_pdrgpss = GPOS_NEW(m_pmp) DrgPss(m_pmp);
}
else if(0 == XMLString::compareString(CDXLTokens::XmlstrToken(EdxltokenSearchStage), xmlstrLocalname))
{
GPOS_ASSERT(NULL != m_pdrgpss);
// start new search stage
CParseHandlerBase *pphSearchStage = CParseHandlerFactory::Pph(m_pmp, CDXLTokens::XmlstrToken(EdxltokenSearchStage), m_pphm, this);
m_pphm->ActivateParseHandler(pphSearchStage);
// store parse handler
this->Append(pphSearchStage);
pphSearchStage->startElement(xmlstrUri, xmlstrLocalname, xmlstrQname, attrs);
}
else
{
CWStringDynamic *pstr = CDXLUtils::PstrFromXMLCh(m_pphm->Pmm(), xmlstrLocalname);
GPOS_RAISE(gpdxl::ExmaDXL, gpdxl::ExmiDXLUnexpectedTag, pstr->Wsz());
}
}
示例10: CSearchStage
//---------------------------------------------------------------------------
// @function:
// CParseHandlerSearchStrategy::EndElement
//
// @doc:
// Invoked by Xerces to process a closing tag
//
//---------------------------------------------------------------------------
void
CParseHandlerSearchStrategy::EndElement
(
const XMLCh* const, // xmlstrUri,
const XMLCh* const xmlstrLocalname,
const XMLCh* const // xmlstrQname
)
{
if (0 != XMLString::compareString(CDXLTokens::XmlstrToken(EdxltokenSearchStrategy), xmlstrLocalname))
{
CWStringDynamic *pstr = CDXLUtils::PstrFromXMLCh(m_pphm->Pmm(), xmlstrLocalname);
GPOS_RAISE(gpdxl::ExmaDXL, gpdxl::ExmiDXLUnexpectedTag, pstr->Wsz());
}
const ULONG ulSize = this->UlLength();
for (ULONG ul = 0; ul < ulSize; ul++)
{
CParseHandlerSearchStage *pphSearchStage = dynamic_cast<CParseHandlerSearchStage*>((*this)[ul]);
CXformSet *pxfs = pphSearchStage->Pxfs();
pxfs->AddRef();
CSearchStage *pss = GPOS_NEW(m_pmp) CSearchStage(pxfs, pphSearchStage->UlTimeThreshold(), pphSearchStage->CostThreshold());
m_pdrgpss->Append(pss);
}
// deactivate handler
m_pphm->DeactivateHandler();
}
示例11:
//---------------------------------------------------------------------------
// @function:
// CParseHandlerDistinctComp::StartElement
//
// @doc:
// Processes a Xerces start element event
//
//---------------------------------------------------------------------------
void
CParseHandlerDistinctComp::StartElement
(
const XMLCh* const, // xmlszUri,
const XMLCh* const xmlszLocalname,
const XMLCh* const, // xmlszQname
const Attributes& attrs
)
{
if(0 != XMLString::compareString(CDXLTokens::XmlstrToken(EdxltokenScalarDistinctComp), xmlszLocalname))
{
CWStringDynamic *pstr = CDXLUtils::PstrFromXMLCh(m_pphm->Pmm(), xmlszLocalname);
GPOS_RAISE(gpdxl::ExmaDXL, gpdxl::ExmiDXLUnexpectedTag, pstr->Wsz());
}
// parse and create distinct operator
m_pdxlop = (CDXLScalarDistinctComp *) CDXLOperatorFactory::PdxlopDistinctCmp(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);
}
示例12:
//---------------------------------------------------------------------------
// @function:
// CParseHandlerScalarSwitchCase::StartElement
//
// @doc:
// Processes a Xerces start element event
//
//---------------------------------------------------------------------------
void
CParseHandlerScalarSwitchCase::StartElement
(
const XMLCh* const, // xmlszUri,
const XMLCh* const xmlszLocalname,
const XMLCh* const, // xmlszQname,
const Attributes& // attrs
)
{
if (0 != XMLString::compareString(CDXLTokens::XmlstrToken(EdxltokenScalarSwitchCase), xmlszLocalname))
{
CWStringDynamic *pstr = CDXLUtils::PstrFromXMLCh(m_pphm->Pmm(), xmlszLocalname);
GPOS_RAISE(gpdxl::ExmaDXL, gpdxl::ExmiDXLUnexpectedTag, pstr->Wsz());
}
// create and activate the parse handler for the children nodes in reverse
// order of their expected appearance
// parse handler for result expression
CParseHandlerBase *pphResult = CParseHandlerFactory::Pph(m_pmp, CDXLTokens::XmlstrToken(EdxltokenScalar), m_pphm, this);
m_pphm->ActivateParseHandler(pphResult);
// parse handler for condition expression
CParseHandlerBase *pphCond = CParseHandlerFactory::Pph(m_pmp, CDXLTokens::XmlstrToken(EdxltokenScalar), m_pphm, this);
m_pphm->ActivateParseHandler(pphCond);
// store parse handlers
this->Append(pphCond);
this->Append(pphResult);
}
示例13: CDXLNode
//---------------------------------------------------------------------------
// @function:
// CParseHandlerScalarSwitchCase::EndElement
//
// @doc:
// Invoked by Xerces to process a closing tag
//
//---------------------------------------------------------------------------
void
CParseHandlerScalarSwitchCase::EndElement
(
const XMLCh* const ,// xmlszUri
const XMLCh* const xmlszLocalname,
const XMLCh* const // xmlszQname
)
{
if (0 != XMLString::compareString(CDXLTokens::XmlstrToken(EdxltokenScalarSwitchCase), xmlszLocalname))
{
CWStringDynamic *pstr = CDXLUtils::PstrFromXMLCh(m_pphm->Pmm(), xmlszLocalname);
GPOS_RAISE(gpdxl::ExmaDXL, gpdxl::ExmiDXLUnexpectedTag, pstr->Wsz());
}
// construct node
m_pdxln = GPOS_NEW(m_pmp) CDXLNode(m_pmp, GPOS_NEW(m_pmp) CDXLScalarSwitchCase(m_pmp));
CParseHandlerScalarOp *pphCond = dynamic_cast<CParseHandlerScalarOp *>((*this)[0]);
CParseHandlerScalarOp *pphResult = dynamic_cast<CParseHandlerScalarOp *>((*this)[1]);
// add constructed children
AddChildFromParseHandler(pphCond);
AddChildFromParseHandler(pphResult);
// deactivate handler
m_pphm->DeactivateHandler();
}
示例14: CDXLPhysicalAssert
//---------------------------------------------------------------------------
// @function:
// CParseHandlerAssert::StartElement
//
// @doc:
// Invoked by Xerces to process an opening tag
//
//---------------------------------------------------------------------------
void
CParseHandlerAssert::StartElement
(
const XMLCh* const , // xmlszUri,
const XMLCh* const xmlszLocalname,
const XMLCh* const , // xmlszQname,
const Attributes& attrs
)
{
if (0 != XMLString::compareString(CDXLTokens::XmlstrToken(EdxltokenPhysicalAssert), xmlszLocalname))
{
CWStringDynamic *pstr = CDXLUtils::PstrFromXMLCh(m_pphm->Pmm(), xmlszLocalname);
GPOS_RAISE(gpdxl::ExmaDXL, gpdxl::ExmiDXLUnexpectedTag, pstr->Wsz());
}
CHAR *szErrorCode = CDXLOperatorFactory::SzValueFromAttrs(m_pphm->Pmm(), attrs, EdxltokenErrorCode, EdxltokenPhysicalAssert);
if (NULL == szErrorCode || GPOS_SQLSTATE_LENGTH != clib::UlStrLen(szErrorCode))
{
GPOS_RAISE
(
gpdxl::ExmaDXL,
gpdxl::ExmiDXLInvalidAttributeValue,
CDXLTokens::PstrToken(EdxltokenPhysicalAssert)->Wsz(),
CDXLTokens::PstrToken(EdxltokenErrorCode)->Wsz()
);
}
m_pdxlop = GPOS_NEW(m_pmp) CDXLPhysicalAssert(m_pmp, szErrorCode);
// ctor created a copy of the error code
GPOS_DELETE_ARRAY(szErrorCode);
// parse handler for child node
CParseHandlerBase *pphChild = CParseHandlerFactory::Pph(m_pmp, CDXLTokens::XmlstrToken(EdxltokenPhysical), m_pphm, this);
m_pphm->ActivateParseHandler(pphChild);
// parse handler for the predicate
CParseHandlerBase *pphAssertPredicate = CParseHandlerFactory::Pph
(
m_pmp,
CDXLTokens::XmlstrToken(EdxltokenScalarAssertConstraintList),
m_pphm,
this
);
m_pphm->ActivateParseHandler(pphAssertPredicate);
// parse handler for the proj list
CParseHandlerBase *pphPrL = CParseHandlerFactory::Pph(m_pmp, CDXLTokens::XmlstrToken(EdxltokenScalarProjList), m_pphm, this);
m_pphm->ActivateParseHandler(pphPrL);
//parse handler for the properties of the operator
CParseHandlerBase *pphProp = CParseHandlerFactory::Pph(m_pmp, CDXLTokens::XmlstrToken(EdxltokenProperties), m_pphm, this);
m_pphm->ActivateParseHandler(pphProp);
this->Append(pphProp);
this->Append(pphPrL);
this->Append(pphAssertPredicate);
this->Append(pphChild);
}
示例15: if
//---------------------------------------------------------------------------
// @function:
// CParseHandlerIndexScan::EndElementHelper
//
// @doc:
// Common EndElement functionality for IndexScan and IndexOnlyScan
//
//---------------------------------------------------------------------------
void
CParseHandlerIndexScan::EndElementHelper
(
const XMLCh* const xmlszLocalname,
Edxltoken edxltoken,
ULONG ulPartIndexId,
ULONG ulPartIndexIdPrintable
)
{
if (0 != XMLString::compareString(CDXLTokens::XmlstrToken(edxltoken), xmlszLocalname))
{
CWStringDynamic *pstr = CDXLUtils::PstrFromXMLCh(m_pphm->Pmm(), xmlszLocalname);
GPOS_RAISE(gpdxl::ExmaDXL, gpdxl::ExmiDXLUnexpectedTag, pstr->Wsz());
}
// construct node from the created child nodes
CParseHandlerProperties *pphProp = dynamic_cast<CParseHandlerProperties *>((*this)[0]);
CParseHandlerProjList *pphPrL = dynamic_cast<CParseHandlerProjList*>((*this)[1]);
CParseHandlerFilter *pphFilter = dynamic_cast<CParseHandlerFilter *>((*this)[2]);
CParseHandlerIndexCondList *pphIdxCondList = dynamic_cast<CParseHandlerIndexCondList *>((*this)[3]);
CParseHandlerIndexDescr *pphIdxD = dynamic_cast<CParseHandlerIndexDescr *>((*this)[4]);
CParseHandlerTableDescr *pphTD = dynamic_cast<CParseHandlerTableDescr *>((*this)[5]);
CDXLTableDescr *pdxltabdesc = pphTD->Pdxltabdesc();
pdxltabdesc->AddRef();
CDXLIndexDescr *pdxlid = pphIdxD->Pdxlid();
pdxlid->AddRef();
CDXLPhysical *pdxlop = NULL;
if (EdxltokenPhysicalIndexOnlyScan == edxltoken)
{
pdxlop = GPOS_NEW(m_pmp) CDXLPhysicalIndexOnlyScan(m_pmp, pdxltabdesc, pdxlid, m_edxlisd);
m_pdxln = GPOS_NEW(m_pmp) CDXLNode(m_pmp, pdxlop);
}
else if (EdxltokenPhysicalIndexScan == edxltoken)
{
pdxlop = GPOS_NEW(m_pmp) CDXLPhysicalIndexScan(m_pmp, pdxltabdesc, pdxlid, m_edxlisd);
m_pdxln = GPOS_NEW(m_pmp) CDXLNode(m_pmp, pdxlop);
}
else
{
GPOS_ASSERT(EdxltokenPhysicalDynamicIndexScan == edxltoken);
pdxlop = GPOS_NEW(m_pmp) CDXLPhysicalDynamicIndexScan(m_pmp, pdxltabdesc, ulPartIndexId, ulPartIndexIdPrintable, pdxlid, m_edxlisd);
m_pdxln = GPOS_NEW(m_pmp) CDXLNode(m_pmp, pdxlop);
}
// set statistics and physical properties
CParseHandlerUtils::SetProperties(m_pdxln, pphProp);
// add children
AddChildFromParseHandler(pphPrL);
AddChildFromParseHandler(pphFilter);
AddChildFromParseHandler(pphIdxCondList);
// deactivate handler
m_pphm->DeactivateHandler();
}