本文整理汇总了C++中step::RefPtr::setElements方法的典型用法代码示例。如果您正苦于以下问题:C++ RefPtr::setElements方法的具体用法?C++ RefPtr::setElements怎么用?C++ RefPtr::setElements使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类step::RefPtr
的用法示例。
在下文中一共展示了RefPtr::setElements方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int n, char **p)
{
Step::RefPtr<ifc2x3::ExpressDataSet> eds ;
try
{
std::cout << "Creating ExpressDataSet" << std::endl;
eds = new ifc2x3::ExpressDataSet;
}
catch (const std::exception& e)
{
TEST_FAILURE((std::string("Exception : ") + e.what()).c_str());
}
TEST_VALIDITY(eds);
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
Step::RefPtr<ifc2x3::IfcDerivedUnit> DerivedUnit = eds->createIfcDerivedUnit();
TEST_VALIDITY(DerivedUnit);
Step::RefPtr<ifc2x3::IfcDimensionalExponents> ResultDimensionalExponents = DerivedUnit->getDimensions();
TEST_VALIDITY(ResultDimensionalExponents);
LOG_DEBUG("ResultDimensionalExponents->getLengthExponent() = " << ResultDimensionalExponents->getLengthExponent() << std::endl);
TEST_ASSERT(ResultDimensionalExponents->getLengthExponent()==0);
LOG_DEBUG("ResultDimensionalExponents->getMassExponent() = " << ResultDimensionalExponents->getMassExponent() << std::endl);
TEST_ASSERT(ResultDimensionalExponents->getMassExponent()==0);
LOG_DEBUG("ResultDimensionalExponents->getTimeExponent() = " << ResultDimensionalExponents->getTimeExponent() << std::endl);
TEST_ASSERT(ResultDimensionalExponents->getTimeExponent()==0);
LOG_DEBUG("ResultDimensionalExponents->getElectricCurrentExponent() = " << ResultDimensionalExponents->getElectricCurrentExponent() << std::endl);
TEST_ASSERT(ResultDimensionalExponents->getElectricCurrentExponent()==0);
LOG_DEBUG("ResultDimensionalExponents->getThermodynamicTemperatureExponent() = " << ResultDimensionalExponents->getThermodynamicTemperatureExponent() << std::endl);
TEST_ASSERT(ResultDimensionalExponents->getThermodynamicTemperatureExponent()==0);
LOG_DEBUG("ResultDimensionalExponents->getAmountOfSubstanceExponent() = " << ResultDimensionalExponents->getAmountOfSubstanceExponent() << std::endl);
TEST_ASSERT(ResultDimensionalExponents->getAmountOfSubstanceExponent()==0);
LOG_DEBUG("ResultDimensionalExponents->getLuminousIntensityExponent() = " << ResultDimensionalExponents->getLuminousIntensityExponent() << std::endl);
TEST_ASSERT(ResultDimensionalExponents->getLuminousIntensityExponent()==0);
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
Step::RefPtr<ifc2x3::IfcDerivedUnitElement> DerivedUnitElement1 = eds->createIfcDerivedUnitElement();
Step::RefPtr<ifc2x3::IfcNamedUnit> ContextDependentUnit1 = eds->createIfcContextDependentUnit();
Step::RefPtr<ifc2x3::IfcDimensionalExponents> DimensionalExponents1 = eds->createIfcDimensionalExponents();
DimensionalExponents1->setLengthExponent(1);
DimensionalExponents1->setMassExponent(1);
DimensionalExponents1->setTimeExponent(1);
DimensionalExponents1->setElectricCurrentExponent(1);
DimensionalExponents1->setThermodynamicTemperatureExponent(1);
DimensionalExponents1->setAmountOfSubstanceExponent(1);
DimensionalExponents1->setLuminousIntensityExponent(1);
ContextDependentUnit1->setDimensions(DimensionalExponents1);
DerivedUnitElement1->setUnit(ContextDependentUnit1);
DerivedUnitElement1->setExponent(1);
Step::RefPtr<ifc2x3::IfcDerivedUnitElement> DerivedUnitElement2 = eds->createIfcDerivedUnitElement();
Step::RefPtr<ifc2x3::IfcNamedUnit> ContextDependentUnit2 = eds->createIfcContextDependentUnit();
Step::RefPtr<ifc2x3::IfcDimensionalExponents> DimensionalExponents2 = eds->createIfcDimensionalExponents();
DimensionalExponents2->setLengthExponent(2);
DimensionalExponents2->setMassExponent(2);
DimensionalExponents2->setTimeExponent(2);
DimensionalExponents2->setElectricCurrentExponent(2);
DimensionalExponents2->setThermodynamicTemperatureExponent(2);
DimensionalExponents2->setAmountOfSubstanceExponent(2);
DimensionalExponents2->setLuminousIntensityExponent(2);
ContextDependentUnit2->setDimensions(DimensionalExponents2);
DerivedUnitElement2->setUnit(ContextDependentUnit2);
DerivedUnitElement2->setExponent(2);
Step::RefPtr<ifc2x3::IfcDerivedUnitElement> DerivedUnitElement3 = eds->createIfcDerivedUnitElement();
Step::RefPtr<ifc2x3::IfcNamedUnit> ContextDependentUnit3 = eds->createIfcContextDependentUnit();
Step::RefPtr<ifc2x3::IfcDimensionalExponents> DimensionalExponents3 = eds->createIfcDimensionalExponents();
DimensionalExponents3->setLengthExponent(3);
DimensionalExponents3->setMassExponent(3);
DimensionalExponents3->setTimeExponent(3);
DimensionalExponents3->setElectricCurrentExponent(3);
DimensionalExponents3->setThermodynamicTemperatureExponent(3);
DimensionalExponents3->setAmountOfSubstanceExponent(3);
DimensionalExponents3->setLuminousIntensityExponent(3);
ContextDependentUnit3->setDimensions(DimensionalExponents3);
DerivedUnitElement3->setUnit(ContextDependentUnit3);
DerivedUnitElement3->setExponent(3);
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
ifc2x3::Set_IfcDerivedUnitElement_1_n SetDerivedUnitElement;
SetDerivedUnitElement.insert(DerivedUnitElement1);
DerivedUnit->setElements(SetDerivedUnitElement);
ResultDimensionalExponents = DerivedUnit->getDimensions();
LOG_DEBUG("ResultDimensionalExponents->getLengthExponent() = " << ResultDimensionalExponents->getLengthExponent() << std::endl);
TEST_ASSERT(ResultDimensionalExponents->getLengthExponent()==1);
LOG_DEBUG("ResultDimensionalExponents->getMassExponent() = " << ResultDimensionalExponents->getMassExponent() << std::endl);
TEST_ASSERT(ResultDimensionalExponents->getMassExponent()==1);
LOG_DEBUG("ResultDimensionalExponents->getTimeExponent() = " << ResultDimensionalExponents->getTimeExponent() << std::endl);
TEST_ASSERT(ResultDimensionalExponents->getTimeExponent()==1);
LOG_DEBUG("ResultDimensionalExponents->getElectricCurrentExponent() = " << ResultDimensionalExponents->getElectricCurrentExponent() << std::endl);
TEST_ASSERT(ResultDimensionalExponents->getElectricCurrentExponent()==1);
//.........这里部分代码省略.........