Rhino C++ API
8.10
|
#include <opennurbs_string.h>
Public Member Functions | |
ON_CheckSum () | |
~ON_CheckSum () | |
bool | CheckBuffer (size_t size, const void *buffer) const |
bool | CheckFile (const wchar_t *filename, bool bSkipTimeCheck=false) const |
bool | CheckFile (FILE *fp, bool bSkipTimeCheck=false) const |
void | Dump (class ON_TextLog &) const |
bool | IsSet () const |
bool | Read (class ON_BinaryArchive &) |
bool | SetBufferCheckSum (size_t size, const void *buffer, time_t time) |
bool | SetFileCheckSum (const wchar_t *filename) |
bool | SetFileCheckSum (FILE *fp) |
bool | Write (class ON_BinaryArchive &) const |
void | Zero () |
zeros all fields. More... | |
Public Attributes | |
ON__UINT32 | m_crc [8] |
crc's More... | |
size_t | m_size |
bytes in the file. More... | |
time_t | m_time |
last modified time in seconds since Jan 1, 1970, UCT More... | |
Static Public Attributes | |
static const ON_CheckSum | UnsetCheckSum |
This class is intended to be used to determine if a file's contents have changed.
ON_CheckSum::ON_CheckSum | ( | ) |
ON_CheckSum::~ON_CheckSum | ( | ) |
bool ON_CheckSum::CheckBuffer | ( | size_t | size, |
const void * | buffer | ||
) | const |
Description: Test buffer to see if it has a matching checksum. Parameters: size - [in] size in bytes buffer - [in] Returns: True if the buffer has a matching checksum.
bool ON_CheckSum::CheckFile | ( | const wchar_t * | filename, |
bool | bSkipTimeCheck = false |
||
) | const |
Description: Test buffer to see if it has a matching checksum. Parameters: filename - [in] bSkipTimeCheck - [in] if true, the time of last modification is not checked. Returns: True if the file has a matching checksum.
bool ON_CheckSum::CheckFile | ( | FILE * | fp, |
bool | bSkipTimeCheck = false |
||
) | const |
Description: Test buffer to see if it has a matching checksum. Parameters: fp - [in] pointer to file opened with ON::OpenFile(...,"rb") bSkipTimeCheck - [in] if true, the time of last modification is not checked. Returns: True if the file has a matching checksum.
void ON_CheckSum::Dump | ( | class ON_TextLog & | ) | const |
bool ON_CheckSum::IsSet | ( | ) | const |
Returns: True if checksum is set.
bool ON_CheckSum::Read | ( | class ON_BinaryArchive & | ) |
bool ON_CheckSum::SetBufferCheckSum | ( | size_t | size, |
const void * | buffer, | ||
time_t | time | ||
) |
C++ default operator=, operator==, and copy constructor work fine. Description: Set check sum values for a buffer Parameters: size - [in] number of bytes in buffer buffer - [in] time - [in] last modified time in seconds since Jan 1, 1970, UCT Returns: True if checksum is set.
bool ON_CheckSum::SetFileCheckSum | ( | const wchar_t * | filename | ) |
Description: Set check sum values for a file. Parameters: filename - [in] name of file. Returns: True if checksum is set.
bool ON_CheckSum::SetFileCheckSum | ( | FILE * | fp | ) |
Description: Set check sum values for a file. Parameters: fp - [in] pointer to a file opened with ON:FileOpen(...,"rb") Returns: True if checksum is set.
bool ON_CheckSum::Write | ( | class ON_BinaryArchive & | ) | const |
void ON_CheckSum::Zero | ( | ) |
zeros all fields.
ON__UINT32 ON_CheckSum::m_crc[8] |
crc's
size_t ON_CheckSum::m_size |
bytes in the file.
time_t ON_CheckSum::m_time |
last modified time in seconds since Jan 1, 1970, UCT
|
static |