Changeset 2584


Ignore:
Timestamp:
11/11/2009 19:22:52 (3 years ago)
Author:
chris
Message:

Add methods to read and write exact 32-bit and 64-bit types.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • box/trunk/lib/common/Archive.h

    r353 r2584  
    4646                Write((int) Item); 
    4747        } 
     48        void WriteExact(uint32_t Item) { Write((int)Item); } 
    4849        void Write(int Item) 
    4950        { 
     
    5657                mrStream.Write(&privItem, sizeof(privItem)); 
    5758        } 
     59        void WriteExact(uint64_t Item) { Write(Item); } 
    5860        void Write(uint64_t Item) 
    5961        { 
     
    8991                } 
    9092        } 
     93        void ReadExact(uint32_t &rItemOut) { Read((int&)rItemOut); } 
    9194        void Read(int &rItemOut) 
    9295        { 
     
    107110                rItemOut = box_ntoh64(privItem); 
    108111        } 
     112        void ReadExact(uint64_t &rItemOut) { Read(rItemOut); } 
    109113        void Read(uint64_t &rItemOut) 
    110114        { 
Note: See TracChangeset for help on using the changeset viewer.