当前位置: 首页>>代码示例>>C++>>正文


C++ RefPtr::getLengthExponent方法代码示例

本文整理汇总了C++中step::RefPtr::getLengthExponent方法的典型用法代码示例。如果您正苦于以下问题:C++ RefPtr::getLengthExponent方法的具体用法?C++ RefPtr::getLengthExponent怎么用?C++ RefPtr::getLengthExponent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在step::RefPtr的用法示例。


在下文中一共展示了RefPtr::getLengthExponent方法的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::IfcSIUnit> SIUnit = eds->createIfcSIUnit();
	TEST_VALIDITY(SIUnit);
	//TEST_ASSERT(SIUnit->getDimensions()==0);

	Step::RefPtr<ifc2x3::IfcDimensionalExponents> DimensionalExponents = eds->createIfcDimensionalExponents();

	DimensionalExponents->setLengthExponent(1);
	DimensionalExponents->setMassExponent(1);
	DimensionalExponents->setTimeExponent(1);
	DimensionalExponents->setElectricCurrentExponent(1);			
	DimensionalExponents->setThermodynamicTemperatureExponent(1);
	DimensionalExponents->setAmountOfSubstanceExponent(1);
	DimensionalExponents->setLuminousIntensityExponent(1);
	SIUnit->setDimensions(DimensionalExponents);

	Step::RefPtr<ifc2x3::IfcDimensionalExponents> ResultDimensionalExponents = SIUnit->getDimensions();
	TEST_ASSERT(ResultDimensionalExponents->getLengthExponent()==0);
	TEST_ASSERT(ResultDimensionalExponents->getMassExponent()==0);
	TEST_ASSERT(ResultDimensionalExponents->getTimeExponent()==0);
	TEST_ASSERT(ResultDimensionalExponents->getElectricCurrentExponent()==0);
	TEST_ASSERT(ResultDimensionalExponents->getThermodynamicTemperatureExponent()==0);
	TEST_ASSERT(ResultDimensionalExponents->getAmountOfSubstanceExponent()==0);
	TEST_ASSERT(ResultDimensionalExponents->getLuminousIntensityExponent()==0);
/*    
IfcUnitEnum_UNSET,
IfcUnitEnum_ABSORBEDDOSEUNIT,
IfcUnitEnum_AMOUNTOFSUBSTANCEUNIT,
IfcUnitEnum_AREAUNIT,
IfcUnitEnum_DOSEEQUIVALENTUNIT,
IfcUnitEnum_ELECTRICCAPACITANCEUNIT,
IfcUnitEnum_ELECTRICCHARGEUNIT,
IfcUnitEnum_ELECTRICCONDUCTANCEUNIT,
IfcUnitEnum_ELECTRICCURRENTUNIT,
IfcUnitEnum_ELECTRICRESISTANCEUNIT,
IfcUnitEnum_ELECTRICVOLTAGEUNIT,
IfcUnitEnum_ENERGYUNIT,
IfcUnitEnum_FORCEUNIT,
IfcUnitEnum_FREQUENCYUNIT,
IfcUnitEnum_ILLUMINANCEUNIT,
IfcUnitEnum_INDUCTANCEUNIT,
IfcUnitEnum_LENGTHUNIT,
IfcUnitEnum_LUMINOUSFLUXUNIT,
IfcUnitEnum_LUMINOUSINTENSITYUNIT,
IfcUnitEnum_MAGNETICFLUXDENSITYUNIT,
IfcUnitEnum_MAGNETICFLUXUNIT,
IfcUnitEnum_MASSUNIT,
IfcUnitEnum_PLANEANGLEUNIT,
IfcUnitEnum_POWERUNIT,
IfcUnitEnum_PRESSUREUNIT,
IfcUnitEnum_RADIOACTIVITYUNIT,
IfcUnitEnum_SOLIDANGLEUNIT,
IfcUnitEnum_THERMODYNAMICTEMPERATUREUNIT,
IfcUnitEnum_TIMEUNIT,
IfcUnitEnum_VOLUMEUNIT,
IfcUnitEnum_USERDEFINED,
*/
	SIUnit->setUnitType(ifc2x3::IfcUnitEnum_ABSORBEDDOSEUNIT);
/*
IfcSIPrefix_UNSET,
IfcSIPrefix_EXA,
IfcSIPrefix_PETA,
IfcSIPrefix_TERA,
IfcSIPrefix_GIGA,
IfcSIPrefix_MEGA,
IfcSIPrefix_KILO,
IfcSIPrefix_HECTO,
IfcSIPrefix_DECA,
IfcSIPrefix_DECI,
IfcSIPrefix_CENTI,
IfcSIPrefix_MILLI,
IfcSIPrefix_MICRO,
IfcSIPrefix_NANO,
IfcSIPrefix_PICO,
IfcSIPrefix_FEMTO,
IfcSIPrefix_ATTO,
*/
	SIUnit->setPrefix(ifc2x3::IfcSIPrefix_EXA);
/*
IfcSIUnitName_UNSET,
IfcSIUnitName_AMPERE,
IfcSIUnitName_BECQUEREL,
IfcSIUnitName_CANDELA,
IfcSIUnitName_COULOMB,
IfcSIUnitName_CUBIC_METRE,
IfcSIUnitName_DEGREE_CELSIUS,
//.........这里部分代码省略.........
开发者ID:gitter-badger,项目名称:ifc2x3-SDK,代码行数:101,代码来源:main.cpp


注:本文中的step::RefPtr::getLengthExponent方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。