16 #ifndef SURGSIM_DEVICES_MULTIAXIS_LINUX_FILEDESCRIPTOR_H 17 #define SURGSIM_DEVICES_MULTIAXIS_LINUX_FILEDESCRIPTOR_H 69 bool readBytes(
void* dataBuffer,
size_t bytesToRead,
size_t* bytesActuallyRead);
103 static const int INVALID_VALUE = -1;
113 #endif // SURGSIM_DEVICES_MULTIAXIS_LINUX_FILEDESCRIPTOR_H Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui n...
Definition: AddRandomSphereBehavior.cpp:36
bool openForReading(const std::string &path)
Attempts to open the file descriptor for reading only.
Definition: FileDescriptor.cpp:93
bool openForWriting(const std::string &path)
Attempts to open the file descriptor for writing only.
Definition: FileDescriptor.cpp:102
void reset()
Resets the file descriptor back to an invalid state.
Definition: FileDescriptor.cpp:123
bool isValid() const
Checks if the file descriptor is valid, i.e.
Definition: FileDescriptor.cpp:63
bool openForReadingAndWriting(const std::string &path)
Attempts to open the file descriptor for reading and writing.
Definition: FileDescriptor.cpp:84
FileDescriptor & operator=(FileDescriptor &&other)
Move assignment operator.
Definition: FileDescriptor.cpp:49
~FileDescriptor()
Destructor.
Definition: FileDescriptor.cpp:58
bool canRead() const
Determines if the file descriptor can be read from.
Definition: FileDescriptor.cpp:68
FileDescriptor()
Default constructor.
Definition: FileDescriptor.cpp:34
A wrapper for an UNIX-style integer file descriptor.
Definition: FileDescriptor.h:29
bool readBytes(void *dataBuffer, size_t bytesToRead, size_t *bytesActuallyRead)
Reads bytes from the file descriptor.
Definition: FileDescriptor.cpp:149
bool openForReadingAndMaybeWriting(const std::string &path)
Attempts to open the file descriptor for reading and (if permissions allow it) writing.
Definition: FileDescriptor.cpp:111
bool hasDataToRead() const
Checks whether this object has data available to be read.
Definition: FileDescriptor.cpp:132
bool canWrite() const
Determines if the file descriptor can be written to.
Definition: FileDescriptor.cpp:73