Rudiments
|
Inherits file.
Public Member Functions | |
shmfile () | |
shmfile (const shmfile &s) | |
shmfile & | operator= (const shmfile &s) |
virtual | ~shmfile () |
![]() | |
file () | |
file (const file &f) | |
file & | operator= (const file &f) |
virtual | ~file () |
bool | open (const char *name, int32_t flags) |
bool | open (const char *name, int32_t flags, mode_t perms) |
bool | create (const char *name, mode_t perms) |
ssize_t | create (const char *name, mode_t perms, uint16_t number) |
ssize_t | create (const char *name, mode_t perms, unsigned long number) |
ssize_t | create (const char *name, mode_t perms, float number) |
ssize_t | create (const char *name, mode_t perms, double number) |
ssize_t | create (const char *name, mode_t perms, char number) |
ssize_t | create (const char *name, mode_t perms, const char *string) |
ssize_t | create (const char *name, mode_t perms, const char *string, size_t size) |
ssize_t | create (const char *name, mode_t perms, const void *data, size_t size) |
char * | getContents () |
ssize_t | getContents (unsigned char *buffer, size_t buffersize) |
bool | truncate () const |
bool | truncate (off64_t length) const |
off64_t | getCurrentPosition () const |
off64_t | setPositionRelativeToBeginning (off64_t offset) const |
off64_t | setPositionRelativeToCurrent (off64_t offset) const |
off64_t | setPositionRelativeToEnd (off64_t offset) const |
bool | tryLockFile (int16_t type) const |
bool | lockFile (int16_t type) const |
bool | checkLockFile (int16_t type, int16_t *conftype, int16_t *confwhence, off64_t *confstart, off64_t *conflen) const |
bool | unlockFile () const |
bool | tryLockRegion (int16_t type, off64_t start, off64_t len) const |
bool | lockRegion (int16_t type, off64_t start, off64_t len) const |
bool | checkLockRegion (int16_t type, off64_t start, off64_t len, int16_t *conftype, int16_t *confwhence, off64_t *confstart, off64_t *conflen) const |
bool | unlockRegion (off64_t start, off64_t len) const |
bool | tryLockFromCurrent (int16_t type, off64_t len) const |
bool | tryLockFromCurrent (int16_t type, off64_t start, off64_t len) const |
bool | lockFromCurrent (int16_t type, off64_t len) const |
bool | lockFromCurrent (int16_t type, off64_t start, off64_t len) const |
bool | checkLockFromCurrent (int16_t type, off64_t len, int16_t *conftype, int16_t *confwhence, off64_t *confstart, off64_t *conflen) const |
bool | checkLockFromCurrent (int16_t type, off64_t start, off64_t len, int16_t *conftype, int16_t *confwhence, off64_t *confstart, off64_t *conflen) const |
bool | unlockFromCurrent (off64_t len) const |
bool | unlockFromCurrent (off64_t start, off64_t len) const |
bool | tryLockFromEnd (int16_t type, off64_t len) const |
bool | tryLockFromEnd (int16_t type, off64_t start, off64_t len) const |
bool | lockFromEnd (int16_t type, off64_t len) const |
bool | lockFromEnd (int16_t type, off64_t start, off64_t len) const |
bool | checkLockFromEnd (int16_t type, off64_t len, int16_t *conftype, int16_t *confwhence, off64_t *confstart, off64_t *conflen) const |
bool | checkLockFromEnd (int16_t type, off64_t start, off64_t len, int16_t *conftype, int16_t *confwhence, off64_t *confstart, off64_t *conflen) const |
bool | unlockFromEnd (off64_t len) const |
bool | unlockFromEnd (off64_t start, off64_t len) const |
bool | tryLockRemainder (int16_t type, off64_t start) const |
bool | lockRemainder (int16_t type, off64_t start) const |
bool | checkLockRemainder (int16_t type, off64_t start, int16_t *conftype, int16_t *confwhence, off64_t *confstart, off64_t *conflen) const |
bool | unlockRemainder (off64_t start) const |
bool | tryLockRemainderFromCurrent (int16_t type) const |
bool | tryLockRemainderFromCurrent (int16_t type, off64_t start) const |
bool | lockRemainderFromCurrent (int16_t type) const |
bool | lockRemainderFromCurrent (int16_t type, off64_t start) const |
bool | checkLockRemainderFromCurrent (int16_t type, int16_t *conftype, int16_t *confwhence, off64_t *confstart, off64_t *conflen) const |
bool | checkLockRemainderFromCurrent (int16_t type, off64_t start, int16_t *conftype, int16_t *confwhence, off64_t *confstart, off64_t *conflen) const |
bool | unlockRemainderFromCurrent () const |
bool | unlockRemainderFromCurrent (off64_t start) const |
bool | tryLockRemainderFromEnd (int16_t type) const |
bool | tryLockRemainderFromEnd (int16_t type, off64_t start) const |
bool | lockRemainderFromEnd (int16_t type) const |
bool | lockRemainderFromEnd (int16_t type, off64_t start) const |
bool | checkLockRemainderFromEnd (int16_t type, int16_t *conftype, int16_t *confwhence, off64_t *confstart, off64_t *conflen) const |
bool | checkLockRemainderFromEnd (int16_t type, off64_t start, int16_t *conftype, int16_t *confwhence, off64_t *confstart, off64_t *conflen) const |
bool | unlockRemainderFromEnd () const |
bool | unlockRemainderFromEnd (off64_t start) const |
bool | sequentialAccess (off64_t start, size_t len) const |
bool | randomAccess (off64_t start, size_t len) const |
bool | onlyOnce (off64_t start, size_t len) const |
bool | willNeed (off64_t start, size_t len) const |
bool | wontNeed (off64_t start, size_t len) const |
bool | normalAccess (off64_t start, size_t len) const |
bool | reserve (off64_t start, size_t len) const |
bool | sync () const |
bool | dataSync () const |
void | dontGetCurrentPropertiesOnOpen () |
void | getCurrentPropertiesOnOpen () |
bool | getCurrentProperties () |
mode_t | getPermissions () const |
uid_t | getOwnerUserId () const |
gid_t | getOwnerGroupId () const |
off64_t | getSize () const |
blksize_t | getBlockSize () const |
blkcnt_t | getBlockCount () const |
int32_t | isSocket () const |
int32_t | isSymbolicLink () const |
int32_t | isRegularFile () const |
int32_t | isBlockDevice () const |
int32_t | isDirectory () const |
int32_t | isCharacterDevice () const |
int32_t | isFifo () const |
time_t | getLastAccessTime () const |
time_t | getLastModificationTime () const |
time_t | getLastChangeTime () const |
dev_t | getDevice () const |
dev_t | getDeviceType () const |
ino_t | getInode () const |
nlink_t | getNumberOfHardLinks () const |
bool | changeOwner (const char *newuser, const char *newgroup) const |
bool | changeOwner (uid_t uid, gid_t gid) const |
bool | changeOwnerUser (const char *newuser) const |
bool | changeOwnerUser (uid_t uid) const |
bool | changeOwnerGroup (const char *newgroup) const |
bool | changeOwnerGroup (gid_t gid) const |
bool | canChangeOwner () const |
long | maxLinks () const |
const char *const * | listAttributes () const |
bool | getAttribute (const char *name, uint16_t *number) const |
bool | getAttribute (const char *name, unsigned long *number) const |
bool | getAttribute (const char *name, int16_t *number) const |
bool | getAttribute (const char *name, long *number) const |
bool | getAttribute (const char *name, float *number) const |
bool | getAttribute (const char *name, double *number) const |
bool | getAttribute (const char *name, unsigned char *character) const |
bool | getAttribute (const char *name, char *character) const |
bool | getAttribute (const char *name, bool *value) const |
bool | getAttribute (const char *name, unsigned char **string) const |
bool | getAttribute (const char *name, char **string) const |
bool | getAttribute (const char *name, unsigned char **string, size_t *size) const |
bool | getAttribute (const char *name, char **string, size_t *size) const |
bool | getAttribute (const char *name, void **buffer, size_t *size) const |
bool | createAttribute (const char *name, uint16_t number) const |
bool | createAttribute (const char *name, unsigned long number) const |
bool | createAttribute (const char *name, int16_t number) const |
bool | createAttribute (const char *name, long number) const |
bool | createAttribute (const char *name, float number) const |
bool | createAttribute (const char *name, double number) const |
bool | createAttribute (const char *name, unsigned char character) const |
bool | createAttribute (const char *name, char character) const |
bool | createAttribute (const char *name, bool value) const |
bool | createAttribute (const char *name, const unsigned char *string) const |
bool | createAttribute (const char *name, const char *string) const |
bool | createAttribute (const char *name, const unsigned char *string, size_t size) const |
bool | createAttribute (const char *name, const char *string, size_t size) const |
bool | createAttribute (const char *name, const void *buffer, size_t size) const |
bool | replaceAttribute (const char *name, uint16_t number) const |
bool | replaceAttribute (const char *name, unsigned long number) const |
bool | replaceAttribute (const char *name, int16_t number) const |
bool | replaceAttribute (const char *name, long number) const |
bool | replaceAttribute (const char *name, float number) const |
bool | replaceAttribute (const char *name, double number) const |
bool | replaceAttribute (const char *name, unsigned char character) const |
bool | replaceAttribute (const char *name, char character) const |
bool | replaceAttribute (const char *name, bool value) const |
bool | replaceAttribute (const char *name, const unsigned char *string) const |
bool | replaceAttribute (const char *name, const char *string) const |
bool | replaceAttribute (const char *name, const unsigned char *string, size_t size) const |
bool | replaceAttribute (const char *name, const char *string, size_t size) const |
bool | replaceAttribute (const char *name, const void *buffer, size_t size) const |
bool | setAttribute (const char *name, uint16_t number) const |
bool | setAttribute (const char *name, unsigned long number) const |
bool | setAttribute (const char *name, int16_t number) const |
bool | setAttribute (const char *name, long number) const |
bool | setAttribute (const char *name, float number) const |
bool | setAttribute (const char *name, double number) const |
bool | setAttribute (const char *name, unsigned char character) const |
bool | setAttribute (const char *name, char character) const |
bool | setAttribute (const char *name, bool value) const |
bool | setAttribute (const char *name, const unsigned char *string) const |
bool | setAttribute (const char *name, const char *string) const |
bool | setAttribute (const char *name, const unsigned char *string, size_t size) const |
bool | setAttribute (const char *name, const char *string, size_t size) const |
bool | setAttribute (const char *name, const void *buffer, size_t size) const |
bool | removeAttribute (const char *name) const |
void * | getInternalFileStatisticsStructure () |
![]() | |
filedescriptor () | |
filedescriptor (const filedescriptor &f) | |
filedescriptor & | operator= (const filedescriptor &f) |
virtual | ~filedescriptor () |
virtual bool | close () |
int32_t | getFileDescriptor () const |
void | setFileDescriptor (int32_t filedesc) |
int32_t | duplicate () const |
bool | duplicate (int32_t newfd) const |
virtual bool | useNonBlockingMode () const |
virtual bool | useBlockingMode () const |
bool | isUsingNonBlockingMode () const |
ssize_t | write (uint16_t number) const |
ssize_t | write (uint32_t number) const |
ssize_t | write (uint64_t number) const |
ssize_t | write (int16_t number) const |
ssize_t | write (int32_t number) const |
ssize_t | write (int64_t number) const |
ssize_t | write (float number) const |
ssize_t | write (double number) const |
ssize_t | write (unsigned char character) const |
ssize_t | write (char character) const |
ssize_t | write (bool value) const |
ssize_t | write (const unsigned char *string) const |
ssize_t | write (const char *string) const |
ssize_t | write (const unsigned char *string, size_t size) const |
ssize_t | write (const char *string, size_t size) const |
ssize_t | write (const void *buffer, size_t size) const |
ssize_t | write (uint16_t number, long sec, long usec) const |
ssize_t | write (uint32_t number, long sec, long usec) const |
ssize_t | write (uint64_t number, long sec, long usec) const |
ssize_t | write (int16_t number, long sec, long usec) const |
ssize_t | write (int32_t number, long sec, long usec) const |
ssize_t | write (int64_t number, long sec, long usec) const |
ssize_t | write (float number, long sec, long usec) const |
ssize_t | write (double number, long sec, long usec) const |
ssize_t | write (unsigned char character, long sec, long usec) const |
ssize_t | write (char character, long sec, long usec) const |
ssize_t | write (bool value, long sec, long usec) const |
ssize_t | write (const unsigned char *string, long sec, long usec) const |
ssize_t | write (const char *string, long sec, long usec) const |
ssize_t | write (const unsigned char *string, size_t size, long sec, long usec) const |
ssize_t | write (const char *string, size_t size, long sec, long usec) const |
ssize_t | write (const void *buffer, size_t size, long sec, long usec) const |
ssize_t | read (uint16_t *buffer) const |
ssize_t | read (uint32_t *buffer) const |
ssize_t | read (uint64_t *buffer) const |
ssize_t | read (int16_t *buffer) const |
ssize_t | read (int32_t *buffer) const |
ssize_t | read (int64_t *buffer) const |
ssize_t | read (float *buffer) const |
ssize_t | read (double *buffer) const |
ssize_t | read (unsigned char *buffer) const |
ssize_t | read (char *buffer) const |
ssize_t | read (bool *buffer) const |
ssize_t | read (unsigned char *buffer, size_t size) const |
ssize_t | read (char *buffer, size_t size) const |
ssize_t | read (void *buf, size_t size) const |
ssize_t | read (char **buffer, const char *terminator) const |
ssize_t | read (uint16_t *buffer, long sec, long usec) const |
ssize_t | read (uint32_t *buffer, long sec, long usec) const |
ssize_t | read (uint64_t *buffer, long sec, long usec) const |
ssize_t | read (int16_t *buffer, long sec, long usec) const |
ssize_t | read (int32_t *buffer, long sec, long usec) const |
ssize_t | read (int64_t *buffer, long sec, long usec) const |
ssize_t | read (float *buffer, long sec, long usec) const |
ssize_t | read (double *buffer, long sec, long usec) const |
ssize_t | read (unsigned char *buffer, long sec, long usec) const |
ssize_t | read (char *buffer, long sec, long usec) const |
ssize_t | read (bool *buffer, long sec, long usec) const |
ssize_t | read (unsigned char *buffer, size_t size, long sec, long usec) const |
ssize_t | read (char *buffer, size_t size, long sec, long usec) const |
ssize_t | read (void *buf, size_t size, long sec, long usec) const |
ssize_t | read (char **buffer, const char *terminator, long sec, long usec) const |
int32_t | waitForNonBlockingRead (long sec, long usec) const |
int32_t | waitForNonBlockingWrite (long sec, long usec) const |
void | retryInterruptedReads () |
void | dontRetryInterruptedReads () |
void | retryInterruptedWrites () |
void | dontRetryInterruptedWrites () |
void | retryInterruptedWaits () |
void | dontRetryInterruptedWaits () |
void | retryInterruptedFcntl () |
void | dontRetryInterruptedFcntl () |
void | retryInterruptedIoctl () |
void | dontRetryInterruptedIoctl () |
void | allowShortReads () |
void | dontAllowShortReads () |
void | allowShortWrites () |
void | dontAllowShortWrites () |
void | useListener (listener *lstnr) |
void | dontUseListener () |
listener * | getListener () |
void | useListenerInsideReads () |
void | dontUseListenerInsideReads () |
void | useListenerInsideWrites () |
void | dontUseListenerInsideWrites () |
virtual bool | passFileDescriptor (int32_t fd) const |
virtual bool | receiveFileDescriptor (int32_t *fd) const |
void | translateByteOrder () |
void | dontTranslateByteOrder () |
int32_t | fCntl (int32_t command, long arg) const |
int32_t | ioCtl (int32_t command, void *arg) const |
bool | useNaglesAlgorithm () |
bool | dontUseNaglesAlgorithm () |
bool | setTcpWriteBufferSize (int32_t size) |
bool | getTcpWriteBufferSize (int32_t *size) |
bool | setTcpReadBufferSize (int32_t size) |
bool | getTcpReadBufferSize (int32_t *size) |
const char * | getType () const |
char * | getPeerAddress () const |
bool | setWriteBufferSize (ssize_t size) const |
bool | flushWriteBuffer (long sec, long usec) const |
bool | setReadBufferSize (ssize_t size) const |
bool | closeOnExec () |
bool | dontCloseOnExec () |
bool | getCloseOnExec () |
Static Public Member Functions | |
static bool | remove (const char *filename) |
![]() | |
static bool | createFile (const char *name, mode_t perms) |
static ssize_t | createFile (const char *name, mode_t perms, uint16_t number) |
static ssize_t | createFile (const char *name, mode_t perms, unsigned long number) |
static ssize_t | createFile (const char *name, mode_t perms, float number) |
static ssize_t | createFile (const char *name, mode_t perms, double number) |
static ssize_t | createFile (const char *name, mode_t perms, char number) |
static ssize_t | createFile (const char *name, mode_t perms, const char *string) |
static ssize_t | createFile (const char *name, mode_t perms, const char *string, size_t size) |
static ssize_t | createFile (const char *name, mode_t perms, const void *data, size_t size) |
static bool | createFifo (const char *filename, mode_t perms) |
static bool | createPipe (filedescriptor *readfd, filedescriptor *writefd) |
static int32_t | createTemporaryFile (char *templatefilename) |
static bool | createHardLink (const char *oldpath, const char *newpath) |
static bool | createSymbolicLink (const char *oldpath, const char *newpath) |
static char * | resolveSymbolicLink (const char *filename) |
static bool | rename (const char *oldpath, const char *newpath) |
static bool | truncate (const char *filename) |
static bool | truncate (const char *filename, off64_t length) |
static char * | getContents (const char *name) |
static ssize_t | getContents (const char *name, unsigned char *buffer, size_t buffersize) |
static bool | exists (const char *filename) |
static bool | readable (const char *filename) |
static bool | writeable (const char *filename) |
static bool | executable (const char *filename) |
static bool | accessible (const char *filename, int32_t mode) |
static bool | getPermissions (const char *filename, mode_t *perms) |
static bool | getOwnerUserId (const char *filename, uid_t *uid) |
static bool | getOwnerGroupId (const char *filename, gid_t *gid) |
static bool | getSize (const char *filename, off64_t *size) |
static bool | getBlockSize (const char *filename, blksize_t *size) |
static bool | getBlockCount (const char *filename, blkcnt_t *blocks) |
static int32_t | isSocket (const char *filename) |
static int32_t | isSymbolicLink (const char *filename) |
static int32_t | isRegularFile (const char *filename) |
static int32_t | isBlockDevice (const char *filename) |
static int32_t | isDirectory (const char *filename) |
static int32_t | isCharacterDevice (const char *filename) |
static int32_t | isFifo (const char *filename) |
static bool | getLastAccessTime (const char *filename, time_t *atime) |
static bool | getLastModificationTime (const char *filename, time_t *mtime) |
static bool | getLastChangeTime (const char *filename, time_t *ctime) |
static bool | getDevice (const char *filename, dev_t *dev) |
static bool | getDeviceType (const char *filename, dev_t *devtype) |
static bool | getInode (const char *filename, ino_t *inode) |
static bool | getNumberOfHardLinks (const char *filename, nlink_t *nlink) |
static bool | changeOwner (const char *filename, const char *newuser, const char *newgroup) |
static bool | changeOwner (const char *filename, uid_t uid, gid_t gid) |
static bool | changeOwnerUser (const char *filename, const char *newuser) |
static bool | changeOwnerUser (const char *filename, uid_t uid) |
static bool | changeOwnerGroup (const char *filename, const char *newgroup) |
static bool | changeOwnerGroup (const char *filename, gid_t gid) |
static bool | canChangeOwner (const char *filename) |
static bool | setLastAccessTime (const char *filename, time_t lastaccesstime) |
static bool | setLastModificationTime (const char *filename, time_t lastmodtime) |
static bool | setLastAccessAndModificationTimes (const char *filename, time_t lastaccesstime, time_t lastmodtime) |
static bool | setLastAccessAndModificationTimes (const char *filename) |
static char * | dirname (const char *filename) |
static char * | basename (const char *filename) |
static char * | basename (const char *filename, const char *suffix) |
static key_t | generateKey (const char *filename, int32_t id) |
static long | maxLinks (const char *filename) |
![]() | |
static uint16_t | hostToNet (uint16_t value) |
static uint32_t | hostToNet (uint32_t value) |
static uint64_t | hostToNet (uint64_t value) |
static uint16_t | netToHost (uint16_t value) |
static uint32_t | netToHost (uint32_t value) |
static uint64_t | netToHost (uint64_t value) |
The shmfile class provides methods for interacting with POSIX shared memory objects. POSIX shared memory objects may be accessed like files, but reside in shared memory rather than on the filesystem.
For maximum portability, the name of a shmfile should begin with a slash (/) and contain no embedded slashes.
shmfile::shmfile | ( | ) |
Creates an instance of the shmfile class.
shmfile::shmfile | ( | const shmfile & | s | ) |
Creates an instance of the shmfile class that is a copy of "s".
|
virtual |
Deletes this instance of the shmfile class.
Makes this instance of the shmfile class identical to "s".
|
static |
Removes POXIX shared memory object "filename". Returns true on success and false on failure.
Reimplemented from file.