16 #ifndef SURGSIM_DEVICES_MULTIAXIS_WIN32_FILEHANDLE_H 17 #define SURGSIM_DEVICES_MULTIAXIS_WIN32_FILEHANDLE_H 74 bool readBytes(
void* dataBuffer,
unsigned int bytesToRead,
unsigned int* bytesActuallyRead);
78 RawHandleType
get()
const;
117 RawHandleType m_handle;
120 uint64_t m_openFlags;
126 #endif // SURGSIM_DEVICES_MULTIAXIS_WIN32_FILEHANDLE_H Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui n...
Definition: AddRandomSphereBehavior.cpp:36
FileHandle & operator=(FileHandle &&other)
Move assignment operator.
Definition: FileHandle.cpp:55
bool openForReading(const std::string &path)
Attempts to open the file handle for reading only.
Definition: FileHandle.cpp:102
uint64_t getFileOpenFlags() const
Gets the flags that will be passed to CreateFile when opening the file.
Definition: FileHandle.cpp:151
bool isValid() const
Checks if the file handle is valid, i.e.
Definition: FileHandle.cpp:70
bool canRead() const
Determines if the file handle can be read from.
Definition: FileHandle.cpp:75
FileHandle()
Default constructor.
Definition: FileHandle.cpp:38
bool openForReadingAndWriting(const std::string &path)
Attempts to open the file handle for reading and writing.
Definition: FileHandle.cpp:91
A wrapper for an Windows-style HANDLE file descriptor.
Definition: FileHandle.h:30
bool canWrite() const
Determines if the file handle can be written to.
Definition: FileHandle.cpp:80
bool openForReadingAndMaybeWriting(const std::string &path)
Attempts to open the file handle for reading and (if permissions allow it) writing.
Definition: FileHandle.cpp:124
bool hasDataToRead() const
Checks whether this object has data available to be read.
Definition: FileHandle.cpp:156
void setFileOpenFlags(uint64_t flags)
Sets the flags that will be passed to CreateFile when opening the file.
Definition: FileHandle.cpp:145
bool openForWriting(const std::string &path)
Attempts to open the file handle for writing only.
Definition: FileHandle.cpp:113
~FileHandle()
Destructor.
Definition: FileHandle.cpp:65
bool readBytes(void *dataBuffer, unsigned int bytesToRead, unsigned int *bytesActuallyRead)
Reads bytes from the file handle.
Definition: FileHandle.cpp:169
void reset()
Resets the file handle back to an invalid state.
Definition: FileHandle.cpp:136
void * RawHandleType
Type of the raw handle used by the operating system.
Definition: FileHandle.h:35