本文整理汇总了C++中Read64函数的典型用法代码示例。如果您正苦于以下问题:C++ Read64函数的具体用法?C++ Read64怎么用?C++ Read64使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Read64函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Read64
void AppInfo::Load(vfsStream& f)
{
authid = Read64(f);
vendor_id = Read32(f);
self_type = Read32(f);
version = Read64(f);
padding = Read64(f);
}
示例2: Read64
void AppInfo::Load(const fs::file& f)
{
authid = Read64(f);
vendor_id = Read32(f);
self_type = Read32(f);
version = Read64(f);
padding = Read64(f);
}
示例3: Read32
void SceHeader::Load(const fs::file& f)
{
se_magic = Read32(f);
se_hver = Read32(f);
se_flags = Read16(f);
se_type = Read16(f);
se_meta = Read32(f);
se_hsize = Read64(f);
se_esize = Read64(f);
}
示例4: Read32
void SceHeader::Load(vfsStream& f)
{
se_magic = Read32(f);
se_hver = Read32(f);
se_flags = Read16(f);
se_type = Read16(f);
se_meta = Read32(f);
se_hsize = Read64(f);
se_esize = Read64(f);
}
示例5: NS_ASSERTION
NS_IMETHODIMP
nsBinaryInputStream::ReadDouble(double* aDouble)
{
NS_ASSERTION(sizeof(double) == sizeof(PRUint64),
"False assumption about sizeof(double)");
return Read64(reinterpret_cast<PRUint64*>(aDouble));
}
示例6: Counter
u64 Counter() const
{
// notes:
// - Read64 is atomic and avoids race conditions.
// - 32-bit counters (m_counterBits == 32) still allow
// reading the whole register (the upper bits are zero).
return Read64(COUNTER_VALUE);
}
示例7: Read32
void XdbFile::StreamLayout::Read(Buffer *buf)
{
if (!buf->HasRemaining(XDB_STREAM_LAYOUT_SIZE))
return;
Read32(buf, &id);
Read64(buf, &offset);
Read32(buf, &size);
Read32(buf, &length);
Read32(buf, &prev_id);
Read32(buf, &next_id);
}
示例8: Activate
Status Activate()
{
RETURN_STATUS_IF_ERR(MapRegisters(m_hpetRegisters));
RETURN_STATUS_IF_ERR(VerifyCapabilities(m_frequency, m_counterBits));
// start the counter (if not already running)
Write64(CONFIG, Read64(CONFIG)|1);
// note: to avoid interfering with any other users of the timer
// (e.g. Vista QPC), we don't reset the counter value to 0.
return INFO::OK;
}
示例9: IfFailRet
HRESULT DataTargetReader::ReadPointer(CORDB_ADDRESS* pPointerValue)
{
HRESULT hr = S_OK;
if (m_remotePointerSize == 0)
{
IfFailRet(GetRemotePointerSize(&m_remotePointerSize));
}
_ASSERTE(m_remotePointerSize == 4 || m_remotePointerSize == 8);
*pPointerValue = 0;
if (m_remotePointerSize == 4)
return Read32((ULONG32*)pPointerValue);
else
return Read64((ULONG64*)pPointerValue);
}
示例10: XPacketFifoV200a_L0Read
/**
*
* Read data from a FIFO and puts it into a specified buffer. The packet FIFO is
* currently 32 or 64 bits wide such that an input buffer which is a series of
* bytes is filled from the FIFO a word at a time. If the requested byte count
* is not a multiple of 32/64 bit words, it is necessary for this function to
* format the remaining 32/64 bit word from the FIFO into a series of bytes in
* the buffer. There may be up to 3/7 extra bytes which must be extracted from
* the last word of the FIFO and put into the buffer.
*
* @param RegBaseAddress is the base address of the FIFO registers.
*
* @param DataBaseAddress is the base address of the FIFO keyhole.
*
* @param BufferPtr points to the memory buffer to write the data into. This
* buffer must be 32 bit aligned or an alignment exception could be
* generated. Since this buffer is a byte buffer, the data is assumed to
* be endian independent.
*
* @param ByteCount contains the number of bytes to read from the FIFO. This
* number of bytes must be present in the FIFO or an error will be
* returned.
*
* @return
*
* XST_SUCCESS indicates the operation was successful. If the number of
* bytes specified by the byte count is not present in the FIFO
* XST_PFIFO_LACK_OF_DATA is returned.
* <br><br>
* If the function was successful, the specified buffer is modified to contain
* the bytes which were removed from the FIFO.
*
* @note
*
* Note that the exact number of bytes which are present in the FIFO is
* not known by this function. It can only check for a number of 32/64 bit
* words such that if the byte count specified is incorrect, but is still
* possible based on the number of words in the FIFO, up to 3/7 garbage bytes
* may be present at the end of the buffer.
* <br><br>
* This function assumes that if the device consuming data from the FIFO is
* a byte device, the order of the bytes to be consumed is from the most
* significant byte to the least significant byte of a 32/64 bit word removed
* from the FIFO.
*
******************************************************************************/
XStatus XPacketFifoV200a_L0Read(Xuint32 RegBaseAddress, Xuint32 DataBaseAddress,
Xuint8 *BufferPtr, Xuint32 ByteCount)
{
Xuint32 Width;
XStatus Result = XST_FIFO_ERROR;
/* determine the width of the FIFO
*/
Width = XIo_In32(RegBaseAddress + XPF_V200A_COUNT_STATUS_REG_OFFSET) &
XPF_V200A_FIFO_WIDTH_MASK;
if ((Width == XPF_V200A_FIFO_WIDTH_LEGACY_TYPE) ||
(Width == XPF_V200A_FIFO_WIDTH_32BITS_TYPE))
{
Result = Read32(RegBaseAddress, DataBaseAddress, BufferPtr, ByteCount);
}
else if (Width == XPF_V200A_FIFO_WIDTH_64BITS_TYPE)
{
Result = Read64(RegBaseAddress, DataBaseAddress, BufferPtr, ByteCount);
}
return Result;
}
示例11: switch
tTJSVariant* tTJSBinarySerializer::ReadBasicType( const tjs_uint8* buff, const tjs_uint size, tjs_uint& index ) {
if( index > size ) return NULL;
tjs_uint8 type = buff[index];
index++;
switch( type ) {
case TYPE_NIL:
return new tTJSVariant((iTJSDispatch2*)NULL);
case TYPE_VOID:
return new tTJSVariant();
case TYPE_TRUE:
return new tTJSVariant((tjs_int)1);
case TYPE_FALSE:
return new tTJSVariant((tjs_int)0);
case TYPE_STRING8: {
if( (index+sizeof(tjs_uint8)) > size ) TJS_eTJSError( TJSReadError );
tjs_uint8 len = buff[index]; index++;
if( (index+(len*sizeof(tjs_char))) > size ) TJS_eTJSError( TJSReadError );
return ReadStringVarint( buff, len, index );
}
case TYPE_STRING16: {
if( (index+sizeof(tjs_uint16)) > size ) TJS_eTJSError( TJSReadError );
tjs_uint16 len = Read16( buff, index );
if( (index+(len*sizeof(tjs_char))) > size ) TJS_eTJSError( TJSReadError );
return ReadStringVarint( buff, len, index );
}
case TYPE_STRING32: {
if( (index+sizeof(tjs_uint32)) > size ) TJS_eTJSError( TJSReadError );
tjs_uint32 len = Read32( buff, index );
if( (index+(len*sizeof(tjs_char))) > size ) TJS_eTJSError( TJSReadError );
return ReadStringVarint( buff, len, index );
}
case TYPE_FLOAT: {
if( (index+sizeof(float)) > size ) TJS_eTJSError( TJSReadError );
tjs_uint32 t = Read32( buff, index );
return new tTJSVariant(*(float*)&t);
}
case TYPE_DOUBLE: {
if( (index+sizeof(double)) > size ) TJS_eTJSError( TJSReadError );
tjs_uint64 t = Read64( buff, index );
return new tTJSVariant(*(double*)&t);
}
case TYPE_UINT8: {
if( (index+sizeof(tjs_uint8)) > size ) TJS_eTJSError( TJSReadError );
tjs_uint8 t = buff[index]; index++;
return new tTJSVariant( t );
}
case TYPE_UINT16: {
if( (index+sizeof(tjs_uint16)) > size ) TJS_eTJSError( TJSReadError );
tjs_uint16 t = Read16( buff, index );
return new tTJSVariant( t );
}
case TYPE_UINT32: {
if( (index+sizeof(tjs_uint32)) > size ) TJS_eTJSError( TJSReadError );
tjs_uint32 t = Read32( buff, index );
return new tTJSVariant( (tjs_int64)t );
}
case TYPE_UINT64: {
if( (index+sizeof(tjs_uint64)) > size ) TJS_eTJSError( TJSReadError );
tjs_uint64 t = Read64( buff, index );
return new tTJSVariant( (tjs_int64)t );
}
case TYPE_INT8: {
if( (index+sizeof(tjs_uint8)) > size ) TJS_eTJSError( TJSReadError );
tjs_uint8 t = buff[index]; index++;
return new tTJSVariant( (tjs_int8)t );
}
case TYPE_INT16: {
if( (index+sizeof(tjs_uint16)) > size ) TJS_eTJSError( TJSReadError );
tjs_uint16 t = Read16( buff, index );
return new tTJSVariant( (tjs_int16)t );
}
case TYPE_INT32: {
if( (index+sizeof(tjs_uint32)) > size ) TJS_eTJSError( TJSReadError );
tjs_uint32 t = Read32( buff, index );
return new tTJSVariant( (tjs_int32)t );
}
case TYPE_INT64: {
if( (index+sizeof(tjs_uint64)) > size ) TJS_eTJSError( TJSReadError );
tjs_uint64 t = Read64( buff, index );
return new tTJSVariant( (tjs_int64)t );
}
case TYPE_RAW16: {
if( (index+sizeof(tjs_uint16)) > size ) TJS_eTJSError( TJSReadError );
tjs_uint16 len = Read16( buff, index );
if( (index+len) > size ) TJS_eTJSError( TJSReadError );
return ReadOctetVarint( buff, len, index );
}
case TYPE_RAW32: {
if( (index+sizeof(tjs_uint32)) > size ) TJS_eTJSError( TJSReadError );
tjs_uint32 len = Read32( buff, index );
if( (index+len) > size ) TJS_eTJSError( TJSReadError );
return ReadOctetVarint( buff, len, index );
}
case TYPE_ARRAY16: {
if( (index+sizeof(tjs_uint16)) > size ) TJS_eTJSError( TJSReadError );
tjs_uint16 count = Read16( buff, index );
return ReadArray( buff, size, count, index );
}
case TYPE_ARRAY32: {
if( (index+sizeof(tjs_uint32)) > size ) TJS_eTJSError( TJSReadError );
//.........这里部分代码省略.........
示例12: Read64
wxUint64 wxDataInputStream::Read64()
{
wxUint64 tmp;
Read64(&tmp, 1);
return tmp;
}
示例13: saver
/**
* Reads and returns a 32-bit value from the stream without advancing the stream's position
*/
UInt64 IDataStream::Peek64(void)
{
IDataStream_PositionSaver saver(this);
return Read64();
}
示例14: m_input
wxDataInputStream::wxDataInputStream(wxInputStream& s, const wxMBConv& conv)
: m_input(&s), m_be_order(false), m_conv(conv.Clone())
#else
wxDataInputStream::wxDataInputStream(wxInputStream& s)
: m_input(&s), m_be_order(false)
#endif
{
}
wxDataInputStream::~wxDataInputStream()
{
#if wxUSE_UNICODE
delete m_conv;
#endif // wxUSE_UNICODE
}
#if wxHAS_INT64
wxUint64 wxDataInputStream::Read64()
{
wxUint64 tmp;
Read64(&tmp, 1);
return tmp;
}
#endif // wxHAS_INT64
wxUint32 wxDataInputStream::Read32()
{
wxUint32 i32;
m_input->Read(&i32, 4);
if (m_be_order)
return wxUINT32_SWAP_ON_LE(i32);
else
return wxUINT32_SWAP_ON_BE(i32);
}
wxUint16 wxDataInputStream::Read16()
{
wxUint16 i16;
m_input->Read(&i16, 2);
if (m_be_order)
return wxUINT16_SWAP_ON_LE(i16);
else
return wxUINT16_SWAP_ON_BE(i16);
}
wxUint8 wxDataInputStream::Read8()
{
wxUint8 buf;
m_input->Read(&buf, 1);
return (wxUint8)buf;
}
double wxDataInputStream::ReadDouble()
{
#if wxUSE_APPLE_IEEE
char buf[10];
m_input->Read(buf, 10);
return ConvertFromIeeeExtended((const wxInt8 *)buf);
#else
return 0.0;
#endif
}