• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ GetProperties函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



在下文中一共展示了GetProperties函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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,代码来源:CairoFont.cpp


示例2: GetProperties

double& PointLoad2DCondition::CalculateIntegrationWeight(double& rIntegrationWeight)
{
  
  if( GetProperties()[THICKNESS] > 0 )
    rIntegrationWeight *= GetProperties()[THICKNESS];

    return rIntegrationWeight;
}
开发者ID:KratosCSIC,项目名称:trunk,代码行数:8,代码来源:point_load_2D_condition.cpp


示例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,代码来源:SoundStream.cpp


示例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,代码来源:Sprite3D.cpp


示例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,代码来源:line_load_axisym_2D_condition.cpp


示例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,代码来源:cam_clay_hardening_law.cpp


示例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,代码来源:thermal_face2D.cpp


示例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,代码来源:total_lagrangian.cpp


示例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,代码来源:beam_element.cpp


示例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,代码来源:DRMUtils.cpp


示例11: GetProperties

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


示例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,代码来源:StreamSwitcher.cpp


示例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,代码来源:Components.c


示例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,代码来源:axisym_updated_lagrangian_element.cpp


示例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,代码来源:prim.cpp


示例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,代码来源:DRMUtils.cpp


示例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,代码来源:VtkConditionSource.cpp


示例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,代码来源:WidgetStyle.cpp


示例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,代码来源:GrPorterDuffXferProcessor.cpp


示例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,代码来源:VtkPointsSource.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GetProperty函数代码示例发布时间:2022-05-30
下一篇:
C++ GetPropW函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap