Exemple #1
0
ZTBSpec ZTBSpec::operator|(const ZTBSpec& iOther) const
	{
	if (this->IsAny() || iOther.IsNone())
		return *this;

	if (this->IsNone() || iOther.IsAny())
		return iOther;

	CriterionUnion theCriterionUnion = fRep->fCriterionUnion;
	theCriterionUnion.insert(theCriterionUnion.end(),
		iOther.fRep->fCriterionUnion.begin(), iOther.fRep->fCriterionUnion.end());
	sSimplify(theCriterionUnion);
	return ZTBSpec(theCriterionUnion, true);
	}
Exemple #2
0
ZTBSpec ZTBSpec::operator&(const ZTBSpec& iOther) const
	{
	if (this->IsNone() || iOther.IsAny())
		return *this;

	if (this->IsAny() || iOther.IsNone())
		return iOther;

	CriterionUnion crossProduct;
	sCrossProduct(fRep->fCriterionUnion, iOther.fRep->fCriterionUnion, crossProduct);
	sSimplify(crossProduct);
	// Here we use our special constructor that swaps its empty list
	// with the passed in list.
	return ZTBSpec(crossProduct, true);
	}