Go to the documentation of this file.
42 # define fseeko fseeko64
43 # define ftello ftello64
47 # define fseeko _fseeki64
48 # define ftello _ftelli64
49 # define fileno _fileno
50 # define ftruncate _chsize_s //Intel Realsense Change, Was: #define ftruncate _chsize
57 using std::shared_ptr;
88 #if defined(_MSC_VER) && (_MSC_VER >= 1400 )
95 #if defined(_MSC_VER) && (_MSC_VER >= 1400 )
103 #if defined(_MSC_VER) && (_MSC_VER >= 1400 )
111 #if defined(_MSC_VER) && (_MSC_VER >= 1400 )
120 read_stream_ = std::make_shared<UncompressedStream>(
this);
127 return feof(
file_) == 0 && ferror(
file_) == 0;
155 throw BagIOException(
"Can't set compression mode before opening a file");
167 throw BagIOException(
"Can't set compression mode before opening a file");
198 int fd = fileno(
file_);
199 return ftruncate(fd,
length) == 0;
GLenum GLuint GLenum GLsizei length
std::string getFileName() const
return path of currently open file
void setWriteMode(CompressionType type)
char * unused_
extra data read by compressed stream
void seek(uint64_t offset, int origin=std::ios_base::beg)
seek to given offset from origin
std::shared_ptr< Stream > write_stream_
int nUnused_
number of bytes of extra data read by compressed stream
void open(std::string const &filename, std::string const &mode)
void openReadWrite(std::string const &filename)
open file for reading & writing
GLsizei const GLchar *const * string
uint64_t compressed_in_
number of bytes written to current compressed stream
uint64_t getOffset() const
return current offset from the beginning of the file
bool isOpen() const
return true if file is open for reading or writing
Exception thrown when on IO problems.
bool good() const
return true if hasn't reached end-of-file and no error
unsigned __int64 uint64_t
Base class for all exceptions thrown by ROS.
uint32_t getCompressedBytesIn() const
return the number of bytes written to current compressed stream
void close()
close the file
void openWrite(std::string const &filename)
open file for writing
GLsizei GLsizei GLchar * source
void decompress(CompressionType compression, uint8_t *dest, unsigned int dest_len, uint8_t *source, unsigned int source_len)
std::shared_ptr< StreamFactory > stream_factory_
void setReadMode(CompressionType type)
uint64_t offset_
current position in the file
void openRead(std::string const &filename)
open file for reading
std::shared_ptr< Stream > read_stream_
void read(void *ptr, size_t size)
read size bytes from the file into ptr
void write(std::string const &s)
std::string filename_
path to file
bool truncate(uint64_t length)
librealsense2
Author(s): LibRealSense ROS Team
autogenerated on Fri Aug 2 2024 08:30:01