您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ GetProperties函数代码示例

51自学网 2021-06-01 21:13:41
  C++
这篇教程C++ GetProperties函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中GetProperties函数的典型用法代码示例。如果您正苦于以下问题:C++ GetProperties函数的具体用法?C++ GetProperties怎么用?C++ GetProperties使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了GetProperties函数的25个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: GetProperties

// --------------------------------------------------------------void CairoFont::SelectFont( cairo_t * cr ) const{	cairo_font_slant_t slant = GetProperties() & VGFont::kFontItalic ? CAIRO_FONT_SLANT_ITALIC : CAIRO_FONT_SLANT_NORMAL;	cairo_font_weight_t weight = GetProperties() & VGFont::kFontBold ? CAIRO_FONT_WEIGHT_BOLD : CAIRO_FONT_WEIGHT_NORMAL;	cairo_select_font_face (cr, GetName(), slant, weight);	cairo_set_font_size (cr, GetSize());}
开发者ID:anttirt,项目名称:guidolib,代码行数:8,


示例2: GetProperties

double& PointLoad2DCondition::CalculateIntegrationWeight(double& rIntegrationWeight){    if( GetProperties()[THICKNESS] > 0 )    rIntegrationWeight *= GetProperties()[THICKNESS];    return rIntegrationWeight;}
开发者ID:KratosCSIC,项目名称:trunk,代码行数:8,


示例3: new

bool cSoundStream::CreateRenderingProperties(){    if(GetProperties())        return true;    vSoundStreamProperties *tmp = new (std::nothrow) vSoundStreamProperties;        __super::m_RenderingProperties = tmp;    return GetProperties() != NULL;};
开发者ID:Nernums,项目名称:ufo,代码行数:11,


示例4: new

bool cSprite3D::CreateRenderingProperties(){    if(GetProperties())        return true;    vSprite3DProperties *tmp = new (std::nothrow) vSprite3DProperties;        __super::m_RenderingProperties = tmp;    return GetProperties() != NULL;}
开发者ID:hallor,项目名称:ufo,代码行数:11,


示例5: GetProperties

void LineLoadAxisym2DCondition::CalculateAndAddRHS(LocalSystemComponents& rLocalSystem, GeneralVariables& rVariables, Vector& rVolumeForce, double& rIntegrationWeight){  double IntegrationWeight = rIntegrationWeight * 2.0 * 3.141592654 * rVariables.CurrentRadius;    if( GetProperties()[THICKNESS] > 0 )      IntegrationWeight /=  GetProperties()[THICKNESS];    //contribution to external forces    ForceLoadCondition::CalculateAndAddRHS( rLocalSystem, rVariables, rVolumeForce, IntegrationWeight );    //KRATOS_WATCH( rRightHandSideVector )}
开发者ID:KratosCSIC,项目名称:trunk,代码行数:13,


示例6: GetProperties

double& CamClayKinematicHardeningLaw::CalculateHardening(double &rHardening, const double &rAlpha, const double rTemperature){	    double FirstPreconsolidationPressure = GetProperties()[PRE_CONSOLIDATION_STRESS];    double SwellingSlope = GetProperties()[SWELLING_SLOPE];    double OtherSlope = GetProperties()[NORMAL_COMPRESSION_SLOPE];    rHardening = -FirstPreconsolidationPressure*(std::exp (-rAlpha/(OtherSlope-SwellingSlope)) ) ;    return rHardening;}
开发者ID:KratosCSIC,项目名称:trunk,代码行数:13,


示例7: GetGeometry

//************************************************************************************//************************************************************************************void ThermalFace2D::CalculateAll(MatrixType& rLeftHandSideMatrix, VectorType& rRightHandSideVector, ProcessInfo& rCurrentProcessInfo, bool CalculateStiffnessMatrixFlag, bool CalculateResidualVectorFlag){    KRATOS_TRY    unsigned int number_of_nodes = GetGeometry().size();    //resizing as needed the LHS    unsigned int MatSize=number_of_nodes;    ConvectionDiffusionSettings::Pointer my_settings = rCurrentProcessInfo.GetValue(CONVECTION_DIFFUSION_SETTINGS);    const Variable<double>& rUnknownVar = my_settings->GetUnknownVariable();    const Variable<double>& rSurfaceSourceVar = my_settings->GetSurfaceSourceVariable();    //calculate lenght    double x21 = GetGeometry()[1].X() - GetGeometry()[0].X();    double y21 = GetGeometry()[1].Y() - GetGeometry()[0].Y();    double lenght = x21*x21 + y21*y21;    lenght = sqrt(lenght);    const Properties& ConstProp = GetProperties();    const double& ambient_temperature = ConstProp[AMBIENT_TEMPERATURE];    double StefenBoltzmann = 5.67e-8;    double emissivity = ConstProp[EMISSIVITY];    double convection_coefficient = ConstProp[CONVECTION_COEFFICIENT];    const double& T0 = GetGeometry()[0].FastGetSolutionStepValue(rUnknownVar);    const double& T1 = GetGeometry()[1].FastGetSolutionStepValue(rUnknownVar);    const double& q0 =GetGeometry()[0].FastGetSolutionStepValue(rSurfaceSourceVar);    const double& q1 =GetGeometry()[1].FastGetSolutionStepValue(rSurfaceSourceVar);    if (CalculateStiffnessMatrixFlag == true) //calculation of the matrix is required    {        if(rLeftHandSideMatrix.size1() != MatSize )            rLeftHandSideMatrix.resize(MatSize,MatSize,false);        noalias(rLeftHandSideMatrix) = ZeroMatrix(MatSize,MatSize);        rLeftHandSideMatrix(0,0) = ( convection_coefficient + emissivity*StefenBoltzmann*4.0*pow(T0,3)  )* 0.5 * lenght;        rLeftHandSideMatrix(1,1) = ( convection_coefficient + emissivity*StefenBoltzmann*4.0*pow(T1,3)  )* 0.5 * lenght;    }    //resizing as needed the RHS    double aux = pow(ambient_temperature,4);    if (CalculateResidualVectorFlag == true) //calculation of the matrix is required    {        if(rRightHandSideVector.size() != MatSize )            rRightHandSideVector.resize(MatSize,false);        rRightHandSideVector[0] =  q0 - emissivity*StefenBoltzmann*(pow(T0,4) - aux)  -  convection_coefficient * ( T0 - ambient_temperature);        rRightHandSideVector[1] =  q1   - emissivity*StefenBoltzmann*(pow(T1,4) - aux) -  convection_coefficient * ( T1 - ambient_temperature);        rRightHandSideVector *= 0.5*lenght;    }    KRATOS_CATCH("")}
开发者ID:KratosCSIC,项目名称:trunk,代码行数:62,


示例8: GetProperties

 void TotalLagrangian::InitializeSolutionStep( ProcessInfo& CurrentProcessInfo ) {     for ( unsigned int i = 0; i < mConstitutiveLawVector.size(); i++ )         mConstitutiveLawVector[i]->InitializeSolutionStep( GetProperties(),                 GetGeometry(), row( GetGeometry().ShapeFunctionsValues( mThisIntegrationMethod ), i ),                 CurrentProcessInfo ); }
开发者ID:KratosCSIC,项目名称:trunk,代码行数:7,


示例9: GetGeometry

void BeamElement::CalculateMassMatrix(MatrixType& rMassMatrix, ProcessInfo& rCurrentProcessInfo){    KRATOS_TRY    unsigned int dimension = GetGeometry().WorkingSpaceDimension();    unsigned int NumberOfNodes = GetGeometry().size();    unsigned int MatSize = dimension * NumberOfNodes;    if(rMassMatrix.size1() != MatSize)        rMassMatrix.resize(MatSize,MatSize,false);    rMassMatrix = ZeroMatrix(MatSize,MatSize);    //const double& mlength = GetGeometry().Length();    double TotalMass = mArea*mlength*GetProperties()[DENSITY];    Vector LumpFact;    LumpFact = GetGeometry().LumpingFactors(LumpFact);    for(unsigned int i=0; i<NumberOfNodes; i++)    {        double temp = LumpFact[i]*TotalMass;        for(unsigned int j=0; j<dimension; j++)        {            unsigned int index = i*dimension + j;            rMassMatrix(index,index) = temp;            if (index==3 || index==4 || index==5)                rMassMatrix(index,index) = 0.00;        }    }    KRATOS_CATCH("")}
开发者ID:KratosCSIC,项目名称:trunk,代码行数:32,


示例10: drmModeGetCrtc

bool CDRMUtils::GetCrtc(){  for(auto i = 0; i < m_drm_resources->count_crtcs; i++)  {    m_crtc->crtc = drmModeGetCrtc(m_fd, m_drm_resources->crtcs[i]);    if(m_crtc->crtc->crtc_id == m_encoder->encoder->crtc_id)    {      CLog::Log(LOGDEBUG, "CDRMUtils::%s - found crtc: %d", __FUNCTION__,                                                            m_crtc->crtc->crtc_id);      m_crtc_index = i;      break;    }    drmModeFreeCrtc(m_crtc->crtc);    m_crtc->crtc = nullptr;  }  if(!m_crtc->crtc)  {    CLog::Log(LOGERROR, "CDRMUtils::%s - could not get crtc: %s", __FUNCTION__, strerror(errno));    return false;  }  if (!GetProperties(m_fd, m_crtc->crtc->crtc_id, DRM_MODE_OBJECT_CRTC, m_crtc))  {    CLog::Log(LOGERROR, "CDRMUtils::%s - could not get crtc %u properties: %s", __FUNCTION__, m_crtc->crtc->crtc_id, strerror(errno));    return false;  }  return true;}
开发者ID:Arcko,项目名称:xbmc,代码行数:30,


示例11: GetProperties

void FdoOdbcOvClassDefinition::AddProperty(     FdoRdbmsOvPropertyDefinition* pProp){    FdoOdbcOvPropertiesP properties = GetProperties();    properties->Add( dynamic_cast<FdoOdbcOvPropertyDefinition*>(pProp) );}
开发者ID:johanvdw,项目名称:fdo-git-mirror,代码行数:7,


示例12: TRACE

STDMETHODIMP CStreamSwitcherAllocator::GetBuffer(    IMediaSample** ppBuffer,    REFERENCE_TIME* pStartTime, REFERENCE_TIME* pEndTime,    DWORD dwFlags){    HRESULT hr = VFW_E_NOT_COMMITTED;    if (!m_bCommitted) {        return hr;    }    /*    TRACE(_T("CStreamSwitcherAllocator::GetBuffer m_pPin->m_evBlock.Wait() + %x/n"), this);        m_pPin->m_evBlock.Wait();    TRACE(_T("CStreamSwitcherAllocator::GetBuffer m_pPin->m_evBlock.Wait() - %x/n"), this);    */    if (m_fMediaTypeChanged) {        if (!m_pPin || !m_pPin->m_pFilter) {            return hr;        }        CStreamSwitcherOutputPin* pOut = (static_cast<CStreamSwitcherFilter*>(m_pPin->m_pFilter))->GetOutputPin();        if (!pOut || !pOut->CurrentAllocator()) {            return hr;        }        ALLOCATOR_PROPERTIES Properties, Actual;        if (FAILED(pOut->CurrentAllocator()->GetProperties(&Actual))) {            return hr;        }        if (FAILED(GetProperties(&Properties))) {            return hr;        }        if (!m_bCommitted || Properties.cbBuffer < Actual.cbBuffer) {            Properties.cbBuffer = Actual.cbBuffer;            if (FAILED(Decommit())) {                return hr;            }            if (FAILED(SetProperties(&Properties, &Actual))) {                return hr;            }            if (FAILED(Commit())) {                return hr;            }            ASSERT(Actual.cbBuffer >= Properties.cbBuffer);            if (Actual.cbBuffer < Properties.cbBuffer) {                return hr;            }        }    }    hr = CMemAllocator::GetBuffer(ppBuffer, pStartTime, pEndTime, dwFlags);    if (m_fMediaTypeChanged && SUCCEEDED(hr)) {        (*ppBuffer)->SetMediaType(&m_mt);        m_fMediaTypeChanged = false;    }    return hr;}
开发者ID:EchoLiao,项目名称:mpc-hc,代码行数:60,


示例13: GetComponent

// Returns the amount if the component parameter is specified. If the component parameter is nil// it returns the definition of the component for the given index.global func GetComponent(id component, int index){	// Safety: can only be called from object or definition context.	if (!this || (GetType(this) != C4V_C4Object && GetType(this) != C4V_Def))		return FatalError(Format("GetComponent must be called from object or definition context and not from %v", this));	// Safety: return nil if Components could not be found or are not a proplist.	if (!this.Components || GetType(this.Components) != C4V_PropList)		return;			// If component is specified return the count for that definition.	if (GetType(component) == C4V_Def)		return this.Components[Format("%i", component)];	// Ensure the index is valid.		index = Max(index, 0);	// If component is not specified return the definition of the component at the index.	var cnt = 0;	for (var entry in GetProperties(this.Components))	{		// Check if the entry is an actual valid definition.		var entry_def = GetDefinition(entry);		if (!entry_def)			continue;		if (index == cnt)			return entry_def;		cnt++;	}	return;}
开发者ID:TheBlackJokerDevil,项目名称:openclonk,代码行数:33,


示例14: GetGeometry

double& AxisymUpdatedLagrangianElement::CalculateTotalMass( double& rTotalMass, const ProcessInfo& rCurrentProcessInfo ){    KRATOS_TRY    //Compute the Volume Change acumulated:    GeneralVariables Variables;    this->InitializeGeneralVariables(Variables,rCurrentProcessInfo);    const GeometryType::IntegrationPointsArrayType& integration_points = GetGeometry().IntegrationPoints( mThisIntegrationMethod );    rTotalMass = 0;    //reading integration points    for ( unsigned int PointNumber = 0; PointNumber < integration_points.size(); PointNumber++ )      {	//compute element kinematics	this->CalculateKinematics(Variables,PointNumber);		//getting informations for integration        double IntegrationWeight = Variables.detJ * integration_points[PointNumber].Weight();	//compute point volume change	double PointVolumeChange = 0;	PointVolumeChange = this->CalculateVolumeChange( PointVolumeChange, Variables );		rTotalMass += PointVolumeChange * GetProperties()[DENSITY] * 2.0 * 3.141592654 * Variables.CurrentRadius * IntegrationWeight;      }    return rTotalMass;    KRATOS_CATCH( "" )}
开发者ID:KratosCSIC,项目名称:trunk,代码行数:33,


示例15: GetAuthoredProperties

std::vector<UsdProperty>UsdPrim::_GetPropertiesInNamespace(const std::string &namespaces,                                   bool onlyAuthored) const{    // XXX Would be nice to someday plumb the prefix search down through pcp    if (namespaces.empty())        return onlyAuthored ? GetAuthoredProperties() : GetProperties();    const char delim = UsdObject::GetNamespaceDelimiter();    TfTokenVector names = _GetPropertyNames(onlyAuthored, /*applyOrder=*/false);    // Set terminator to the expected position of the delimiter after all the    // supplied namespaces.  We perform an explicit test for this char below    // so that we don't need to allocate a new string if namespaces does not    // already end with the delimiter    const size_t terminator = namespaces.size() -        (*namespaces.rbegin() == delim);    // Prune out non-matches before we sort    size_t insertionPt = 0;    for (const auto& name : names) {        const std::string &s = name.GetString();        if (s.size() > terminator               &&            TfStringStartsWith(s, namespaces)   &&             s[terminator] == delim) {            names[insertionPt++] = name;        }    }    names.resize(insertionPt);    sort(names.begin(), names.end(), TfDictionaryLessThan());    _ApplyOrdering(GetPropertyOrder(), &names);    return _MakeProperties(names);}
开发者ID:lvxejay,项目名称:USD,代码行数:35,


示例16: drmModeGetConnector

bool CDRMUtils::GetConnector(){  for(auto i = 0; i < m_drm_resources->count_connectors; i++)  {    m_connector->connector = drmModeGetConnector(m_fd,                                                      m_drm_resources->connectors[i]);    if(m_connector->connector->connection == DRM_MODE_CONNECTED)    {      CLog::Log(LOGDEBUG, "CDRMUtils::%s - found connector: %d", __FUNCTION__,                                                                 m_connector->connector->connector_id);      break;    }    drmModeFreeConnector(m_connector->connector);    m_connector->connector = nullptr;  }  if(!m_connector->connector)  {    CLog::Log(LOGERROR, "CDRMUtils::%s - could not get connector: %s", __FUNCTION__, strerror(errno));    return false;  }  if (!GetProperties(m_fd, m_connector->connector->connector_id, DRM_MODE_OBJECT_CONNECTOR, m_connector))  {    CLog::Log(LOGERROR, "CDRMUtils::%s - could not get connector %u properties: %s", __FUNCTION__, m_connector->connector->connector_id, strerror(errno));    return false;  }  return true;}
开发者ID:Arcko,项目名称:xbmc,代码行数:30,


示例17: _points

VtkConditionSource::VtkConditionSource()	: _points(NULL), _cond_vec(NULL){	this->SetNumberOfInputPorts(0);	const GeoLib::Color* c = GeoLib::getRandomColor();	GetProperties()->SetColor((*c)[0] / 255.0,(*c)[1] / 255.0,(*c)[2] / 255.0);}
开发者ID:JobstM,项目名称:ogs,代码行数:8,


示例18: GetProperties

void WidgetStyle::AddExitProperty(UIState st, const NamedProperties& prop){	State state;	state.type = STATE_EXIT;	state.state1 = st;	GetProperties()[state] = prop;}
开发者ID:2bitdreamer,项目名称:SD6_Engine,代码行数:8,


示例19: BlendFormula

 constexpr BlendFormula(OutputType primaryOut, OutputType secondaryOut, GrBlendEquation equation,                        GrBlendCoeff srcCoeff, GrBlendCoeff dstCoeff)         : fPrimaryOutputType(primaryOut)         , fSecondaryOutputType(secondaryOut)         , fBlendEquation(equation)         , fSrcCoeff(srcCoeff)         , fDstCoeff(dstCoeff)         , fProps(GetProperties(primaryOut, secondaryOut, equation, srcCoeff, dstCoeff)) {}
开发者ID:Wafflespeanut,项目名称:gecko-dev,代码行数:8,


示例20: _points

VtkPointsSource::VtkPointsSource() : _points(nullptr){    _removable = false; // From VtkAlgorithmProperties    this->SetNumberOfInputPorts(0);    const DataHolderLib::Color c = DataHolderLib::getRandomColor();    GetProperties()->SetColor(c[0] / 255.0,c[1] / 255.0,c[2] / 255.0);}
开发者ID:wenqing,项目名称:ogs,代码行数:8,


示例21: GetAllProperties

void ezRTTI::GetAllProperties(ezHybridArray<ezAbstractProperty*, 32>& out_Properties) const{  out_Properties.Clear();  if (m_pParentType)    m_pParentType->GetAllProperties(out_Properties);  out_Properties.PushBackRange(GetProperties());}
开发者ID:ezEngine,项目名称:ezEngine,代码行数:9,


示例22: _polylines

VtkPolylinesSource::VtkPolylinesSource()	: _polylines(NULL){	_removable = false; // From VtkAlgorithmProperties	this->SetNumberOfInputPorts(0);	const GeoLib::Color* c = GeoLib::getRandomColor();	GetProperties()->SetColor((*c)[0] / 255.0,(*c)[1] / 255.0,(*c)[2] / 255.0);}
开发者ID:Stefan6,项目名称:ogs,代码行数:9,


示例23: GetProperties

void cSprite3D::PrepareForRendering(){    vSprite3DProperties *prop = GetProperties();    if(!prop)        return;    prop->Synchronize(this);}
开发者ID:hallor,项目名称:ufo,代码行数:9,


示例24: GetProperties

int CPFAOptimize::GetProperties( const map< int, vector< int > >& IntVecMap, const int& iRow, const int& iLine ){	map< int, vector< int > >::const_iterator IntVecMapIt = IntVecMap.find( iRow );	if( IntVecMap.end() == IntVecMapIt )	{		return 0;	}	return GetProperties( IntVecMapIt->second, iLine );}
开发者ID:uesoft,项目名称:AutoPFA,代码行数:9,


示例25: ApplyBaseQuality

global func ApplyBaseQuality(){	if (!this.QualitySettings) return false;	var properties = GetProperties(this.QualitySettings.Properties);	var len = GetLength(properties);	for (var i = 0; i < len; ++i)	{		this[properties[i]] = this.QualitySettings.Properties[properties[i]].Base;	}	return true;}
开发者ID:walachey,项目名称:openclonk-survival,代码行数:11,



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


C++ GetProperty函数代码示例
C++ GetPropW函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。