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


C++ UInt32函数代码示例

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


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

示例1: qint64

LONG InStream::Read(void *data, UInt32 size, UInt32 *processedSize)
{
    if (processedSize)
        *processedSize = 0;
    if (!ioDevice_->isReadable())
        return E_FAIL;
    char* buffer = reinterpret_cast<char*>(data);
    qint64 readBytes = ioDevice_->read(buffer, qint64(size));
    if (-1 == readBytes)
        return E_FAIL;
    if (processedSize)
        *processedSize = UInt32(readBytes);
    return S_OK;
}
开发者ID:woronin,项目名称:kumir2,代码行数:14,代码来源:instream.cpp

示例2: addAttachment

void AttachmentContainer::addAttachment(
    AttachmentObj * const pAttachment,
    UInt16                binding)
{
    UInt32 key;

    if(pAttachment == NULL)
        return;

    key = (UInt32 (pAttachment->getGroupId()) << 16) | binding;

    if(this->isMTLocal())
    {
        RecordedRefCountPolicy::addRef(pAttachment);
    }
    else
    {
        UnrecordedRefCountPolicy::addRef(pAttachment);
    }

    pAttachment->linkParent(this, 
                            AttachmentsFieldId, 
                            Attachment::ParentsFieldId);

    Self::editSField(AttachmentsFieldMask);

    AttachmentObjPtrMapIt fcI = _sfAttachments.getValue().find(key);

    if(fcI != _sfAttachments.getValue().end())
    {
        (*fcI).second->unlinkParent(this, 
                                    Attachment::ParentsFieldId);

        if(this->isMTLocal())
        {
            RecordedRefCountPolicy::subRef((*fcI).second);
        }
        else
        {
            UnrecordedRefCountPolicy::subRef((*fcI).second);
        }

        (*fcI).second = pAttachment;
    }
    else
    {
        _sfAttachments.getValue()[key] = pAttachment;
    }
}
开发者ID:vossg,项目名称:OpenSGDevMaster,代码行数:49,代码来源:OSGAttachmentContainer.cpp

示例3: Inherited

LightBase::LightBase(void) :
    Inherited(),
    _sfAmbient                (Color4f(0.f,0.f,0.f,1.f)),
    _sfDiffuse                (Color4f(1.f,1.f,1.f,1.f)),
    _sfSpecular               (Color4f(1.f,1.f,1.f,1.f)),
    _sfBeacon                 (NULL),
    _sfOn                     (bool(true)),
    _sfConstantAttenuation    (Real32(1.f)),
    _sfLinearAttenuation      (Real32(0.f)),
    _sfQuadraticAttenuation   (Real32(0.f)),
    _sfLightEngine            (NULL),
    _sfShadowIntensity        (Real32(0.f)),
    _sfShadowMode             (UInt32(0))
{
}
开发者ID:baibaiwei,项目名称:OpenSGDevMaster,代码行数:15,代码来源:OSGLightBase.cpp

示例4: OW_ASSERT

const String
SocketAddress::toString() const
{
	OW_ASSERT(m_type != UNSET);
	String rval;
	if (m_type == INET)
	{
		rval = getAddress() + ":" + String(UInt32(getPort()));
	}
	else
	{
		rval = this->m_name;
	}
	return rval;
}
开发者ID:kkaempf,项目名称:openwbem,代码行数:15,代码来源:OW_SocketAddress.cpp

示例5: XTRACE

bool zoStreamBufferImplLZMA::init( void)
{
    XTRACE();
    _fstream << (Uint32) LZMASTREAM_MAGIC;

    _encoder= new NCompress::NLZMA::CEncoder;

    UInt32 algorithm = 2;               // max compression
    UInt32 dictionary = 1 << 23;        // 8 Meg dictionary
    bool eos = true;

    PROPID propIDs[] =
    {
	NCoderPropID::kDictionarySize,
	NCoderPropID::kAlgorithm,
	NCoderPropID::kEndMarker
    };
    const int kNumProps = sizeof(propIDs) / sizeof(propIDs[0]);
    PROPVARIANT properties[kNumProps];
    properties[0].vt = VT_UI4;
    properties[0].ulVal = UInt32(dictionary); properties[1].vt = VT_UI4;
    properties[1].ulVal = UInt32(algorithm);
    properties[2].vt = VT_BOOL;
    properties[2].boolVal = eos ? VARIANT_TRUE : VARIANT_FALSE;

    if (_encoder->SetCoderProperties(propIDs, properties, kNumProps) != S_OK)
    {
        LOG_ERROR << "Unable to set properties\n";
	return false;
    }

    _encoder->WriteCoderProperties(this);
    _encoder->SetStreams( this, this, 0, 0);

    return true;
}
开发者ID:BackupTheBerlios,项目名称:sotu-svn,代码行数:36,代码来源:zStreamBufferImplLZMA.cpp

示例6: Inherited

GeoVectorBufferPropertyBase::GeoVectorBufferPropertyBase(void) :
    Inherited(),
    _sfStride                 (UInt32(0)),
    _sfFormat                 (UInt32(GL_FLOAT)),
    _sfFormatSize             (UInt32(4)),
    _sfDimension              (UInt32(3)),
    _sfVectorType             (UInt32(GeoProperty::VectorTypeVector)),
    _sfSize                   (UInt32(0))
{
}
开发者ID:Himbeertoni,项目名称:OpenSGDevMaster,代码行数:10,代码来源:OSGGeoVectorBufferPropertyBase.cpp

示例7: Inherited

FCDTestFCBase::FCDTestFCBase(void) :
    Inherited(),
    _sfFieldSFPub             (UInt32(0)),
    _sfFieldSFPro             (UInt32(0)),
    _sfFieldSFNo              (UInt32(0)),
    _mfFieldMFPub             (UInt32(0)),
    _mfFieldMFPro             (UInt32(0)),
    _mfFieldMFNo              (UInt32(0))
{
}
开发者ID:Himbeertoni,项目名称:OpenSGDevMaster,代码行数:10,代码来源:OSGFCDTestFCBase.cpp

示例8: OSG_OSB_LOG

/*! Writes all fields to the stream, except for those whose name is in
    \a excludeFields. Optionally writes an end marker.

    The excludeFields string has the format: "'name1' 'name2' 'name3'",
    the spaces between the "'" are mandatory.

    \param[in] excludeFields String of field names that shall be skipped.
    \param[in] endMarker Write an end marker to the stream after all fields are
    processed.
 */
void
OSBCommonElement::writeFields(
    const std::string &excludeFields, const bool endMarker)
{
    OSG_OSB_LOG(("OSBCommonElement::writeFields: "
            "excludeFields: [%s]\n", excludeFields.c_str()));

    FieldContainer *fc         = getContainer();
    UInt32          fieldCount = fc->getType().getNumFieldDescs();

    // go through all fields and write them.
    for(UInt32 fieldId = 1; fieldId <= fieldCount; ++fieldId)
    {
        const FieldDescriptionBase *fieldDesc =
            fc->getFieldDescription(fieldId);
        const std::string          &fieldName = fieldDesc->getName();

        // skip internal fields
        if(fieldDesc->isInternal())
        {
            OSG_OSB_LOG(("OSBCommonElement::writeFields: "
                    "Skipping internal field: [%s]\n", fieldName.c_str()));
            continue;
        }

        // skip excluded fields
        if((!excludeFields.empty()                                        ) &&
           (excludeFields.find("'" + fieldName + "'") != std::string::npos)   )
        {
            OSG_OSB_LOG(("OSBCommonElement::writeFields: "
                    "Skipping excluded field: [%s]\n", fieldName.c_str()));
            continue;
        }

        const FieldType   &fieldType     = fieldDesc->getFieldType();
        const std::string &fieldTypeName = fieldType .getName     ();
        BitVector          fieldMask     = fieldDesc->getFieldMask();
        UInt32             fieldSize     = UInt32(fc->getBinSize(fieldMask));

        writeFieldHeader (fieldName, fieldTypeName, fieldSize);
        writeFieldContent(fieldId                            );
    }

    if(endMarker)
    {
        writeEndMarker();
    }
}
开发者ID:Himbeertoni,项目名称:OpenSGDevMaster,代码行数:58,代码来源:OSGOSBCommonElement.cpp

示例9: Inherited

CgFXMaterialBase::CgFXMaterialBase(void) :
    Inherited(),
    _sfTreatTechniquesAsVariants(bool(false)),
    _sfEffectFile             (),
    _sfEffectString           (),
    _mfCompilerOptions        (),
    _sfVariables              (this,
                          VariablesFieldId,
                          ShaderProgramVariables::ParentsFieldId),
    _mfVariableNames          (),
    _sfStateVariables         (UInt32(0)),
    _mfTechniques             (),
    _mfTextures               (),
    _sfGLId                   (GLenum(0))
{
}
开发者ID:DirkReiners,项目名称:OpenSGDevMaster,代码行数:16,代码来源:OSGCgFXMaterialBase.cpp

示例10: sendActivateEvent

static void sendActivateEvent(nsIEventHandler* handler, WindowRef window, Boolean active)
{
    EventRecord event;
    ::OSEventAvail(0, &event);
    event.what = activateEvt;
    event.message = UInt32(window);
    if (active)
        event.modifiers |= activeFlag;
    else
        event.modifiers &= ~activeFlag;

    nsPluginEvent pluginEvent = { &event, window };
    PRBool handled = PR_FALSE;

    handler->HandleEvent(&pluginEvent, &handled);
}
开发者ID:binoc-software,项目名称:mozilla-cvs,代码行数:16,代码来源:AltWindowHandling.cpp

示例11: getContainerId

void NFIOBase::writeFCId(const FieldContainerPtr &fc)
{
    if(fc == NullFC)
    {
        _out->putValue(UInt32(0));
        return;
    }
    
    UInt32 id = getContainerId(fc);
    _out->putValue(id);
    
    if(_fcSet.count(id) == 0)
    {
        _fcSet.insert(id);
        _fcList.push_back(fc);
    }
}
开发者ID:mlimper,项目名称:OpenSG1x,代码行数:17,代码来源:OSGNFIOBase.cpp

示例12: UInt32

void DrawEnv::updateChunk(State         *pState,
                          StateOverride *pOverride)
{
    StateChunk   *c      = pState->getChunk(State::UpdateChunk);
    UInt32 const  climit = pState->getCoreGLChunkLimit();

    if(pOverride->size()         >  0                  &&
       pOverride->begin()->first == State::UpdateChunk  )
    {
        c = pOverride->begin()->second;
    }

    if(c != NULL && c->getIgnore() == false && c->getClassId() < climit)
    {
        c->changeFrom(this, c, UInt32(0));
    }
}
开发者ID:Himbeertoni,项目名称:OpenSGDevMaster,代码行数:17,代码来源:OSGDrawEnv.cpp

示例13: Inherited

ViewportBase::ViewportBase(void) :
    Inherited(),
    _sfLeft                   (Real32(0.f)),
    _sfRight                  (Real32(1.f)),
    _sfBottom                 (Real32(0.f)),
    _sfTop                    (Real32(1.f)),
    _sfParent                 (NULL),
    _sfCamera                 (NULL),
    _sfRoot                   (NULL),
    _sfBackground             (NULL),
    _mfForegrounds            (),
    _sfTravMask               (UInt32(TypeTraits<UInt32>::getMax())),
    _sfDrawTime               (Real32(0.0f)),
    _sfDrawableId             (Int32(-1)),
    _sfRenderOptions          (NULL)
{
}
开发者ID:vrsource,项目名称:OpenSGDevMaster,代码行数:17,代码来源:OSGViewportBase.cpp

示例14: return

// Outdated - use 'ITRLightingOptions' instead
Persistent::Base::Error ITRLightOptions2::write( StreamIO & io_sio,
   int /*version*/, int /*user*/ )
{
   io_sio.write(UInt32(m_lightingType));
   io_sio.write(m_geometryScale);
   io_sio.write(m_lightScale);
   io_sio.write(m_useNormals);
   io_sio.write(m_emissionQuantumNumber);
   io_sio.write(m_useMaterialProperties);

   // ambient
   io_sio.write(m_ambientIntensity.red);
   io_sio.write(m_ambientIntensity.green);
   io_sio.write(m_ambientIntensity.blue);
   
   return ((io_sio.getStatus() == STRM_OK) ? Ok : WriteError);
}
开发者ID:AltimorTASDK,项目名称:TribesRebirth,代码行数:18,代码来源:itrShapeEdit.cpp

示例15: UInt32

Persistent::Base::Error ITRLightingOptions::write( StreamIO & sio, int, int )
{
   sio.write( UInt32( m_lightingType ) );
   sio.write( m_geometryScale );
   sio.write( m_lightScale );
   sio.write( m_useNormals );
   sio.write( m_emissionQuantumNumber );
   sio.write(m_useMaterialProperties );

   // ambient
   sio.write( m_ambientIntensity.red );
   sio.write( m_ambientIntensity.green );
   sio.write( m_ambientIntensity.blue );
   sio.write( m_applyAmbientOutside );
   
   return( ( sio.getStatus() == STRM_OK ) ? Ok : WriteError );
}
开发者ID:AltimorTASDK,项目名称:TribesRebirth,代码行数:17,代码来源:itrShapeEdit.cpp


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