/Users/green/Documents/workspace/DavisDB_public/Common.h File Reference

Some common declarations for the DavisDB project. More...

#include <limits.h>

Go to the source code of this file.

Defines

#define BUILD_BUG_ON(condition)   ((void)sizeof(char[1 - 2*!!(condition)]))
 A helpful macro for compile-time assertions.

Typedefs

typedef unsigned int uint
 Shorthand for unsigned int.
typedef unsigned char uchar
 Shorthand for unsigned char.
typedef unsigned long ulong
 Shorthand for unsigned long.

Enumerations

enum  ReturnCode {
  RC_OK, RC_EOF, RC_PAGE_PINNED, RC_PAGE_NOT_IN_BUFFER,
  RC_PAGE_UNPINNED, RC_PAGE_FREE, RC_INVALID_PAGE, RC_FILE_OPEN,
  RC_CLOSED_FILE, RC_FILE_NOT_FOUND, RC_INVALID_ARGUMENT, RC_FILE_ALREADY_EXISTS,
  RC_PAGE_NOT_FOUND, RC_PAGE_NOT_DIRTY, RC_NOT_OPEN_FILE, RC_RECORD_TOO_LARGE,
  RC_RECORD_NOT_FOUND, RC_RECORD_ALREADY_IN_INDEX, RC_OUT_OF_MEMORY, RC_OUT_OF_BUFFER,
  RC_INCOMPLETE_READ, RC_INCOMPLETE_WRITE, RC_INCOMPLETE_HEADER_READ, RC_INCOMPLETE_HEADER_WRITE,
  RC_PAGE_IN_BUFFER, RC_INVALID_NAME, RC_UNIX, RC_CORRUPT_FILE,
  RC_FILE_TOO_BIG, RC_UNIMPLEMENTED
}

Detailed Description

Some common declarations for the DavisDB project.


Define Documentation

#define BUILD_BUG_ON ( condition   )     ((void)sizeof(char[1 - 2*!!(condition)]))

A helpful macro for compile-time assertions.

A helpful macro for compile-time assertions, used to break the build if the condition is not satisfied. This can be useful, e.g., to ensure that a given structure will fit on a PF_PAGE_SIZE-byte page. See AllocationPage for sample usage.


Enumeration Type Documentation

enum ReturnCode

Standard return codes for DavisDB components, indicating success or various errors and exceptions.

Enumerator:
RC_OK 

success

RC_EOF 

end of file

RC_PAGE_PINNED 

page pinned in buffer

RC_PAGE_NOT_IN_BUFFER 

page to be unpinned is not in buffer

RC_PAGE_UNPINNED 

page already unpinned

RC_PAGE_FREE 

page already free

RC_INVALID_PAGE 

invalid page number

RC_FILE_OPEN 

file handle already open

RC_CLOSED_FILE 

file is closed

RC_FILE_NOT_FOUND 

file not found

RC_INVALID_ARGUMENT 

invalid argument to function

RC_FILE_ALREADY_EXISTS 

file already exists

RC_PAGE_NOT_FOUND 

specified page not found

RC_PAGE_NOT_DIRTY 

forced page was not dirty

RC_NOT_OPEN_FILE 

handle not refers to an open file

RC_RECORD_TOO_LARGE 

record size larger than page size

RC_RECORD_NOT_FOUND 

specified record was not found

RC_RECORD_ALREADY_IN_INDEX 

specified record is already in the index

RC_OUT_OF_MEMORY 

out of memory

RC_OUT_OF_BUFFER 

out of buffer space

RC_INCOMPLETE_READ 

incomplete read of page from file

RC_INCOMPLETE_WRITE 

incomplete write of page to file

RC_INCOMPLETE_HEADER_READ 

incomplete read of header from file

RC_INCOMPLETE_HEADER_WRITE 

incomplete write of header to file

RC_PAGE_IN_BUFFER 

new allocated page already in buffer

RC_INVALID_NAME 

invalid file name

RC_UNIX 

Unix error.

RC_CORRUPT_FILE 

file appears to be corrupt

RC_FILE_TOO_BIG 

file is at maximum length

RC_UNIMPLEMENTED 

method is unimplemented

Generated on Sun May 16 23:18:41 2010 for DavisDB by  doxygen 1.6.3