OpenJPH Open-source implementation of JPEG2000 Part-15

Loading...
Searching...
No Matches
ojph::mem_infile Class Reference

`#include <ojph_file.h>`

Inheritance diagram for ojph::mem_infile:

## Public Member Functions
| mem_infile ()
| ~mem_infile () override
| mem_infile (mem_infile const &)=delete
mem_infile & | operator= (mem_infile const &)=delete
| mem_infile (mem_infile &&) noexcept
mem_infile & | operator= (mem_infile &&) noexcept
void | open (const ui8 *data, size_t size)
size_t | read (void *ptr, size_t size) override
int | seek (si64 offset, enum infile_base::seek origin) override
si64 | tell () override
bool | eof () override
void | close () override
Public Member Functions inherited from ojph::infile_base
virtual | ~infile_base ()

## Private Member Functions
void | swap (mem_infile &) noexcept

## Private Attributes
const ui8 * | data
const ui8 * | cur_ptr
size_t | size

## Additional Inherited Members
Public Types inherited from ojph::infile_base
enum | seek : int { OJPH_SEEK_SET = SEEK_SET , OJPH_SEEK_CUR = SEEK_CUR , OJPH_SEEK_END = SEEK_END }

## Detailed Description

Definition at line 308 of file ojph_file.h.

## Constructor & Destructor Documentation

## ◆ mem_infile() [1/3]

ojph::mem_infile::mem_infile | ( |  | ) |
| inline

Definition at line 311 of file ojph_file.h.

References close().

Referenced by mem_infile(), mem_infile(), operator=(), operator=(), and swap().

## ◆ ~mem_infile()

ojph::mem_infile::~mem_infile | ( |  | ) |
| inline override

Definition at line 312 of file ojph_file.h.

## ◆ mem_infile() [2/3]

ojph::mem_infile::mem_infile | ( | mem_infile const & |  | ) |
| delete

References mem_infile().

## ◆ mem_infile() [3/3]

ojph::mem_infile::mem_infile | ( | mem_infile && | rhs | ) |
| noexcept

Move construction leaves the moved-from value in default constructed state and transfers ownership of the internal state to the moved-to instance.

Definition at line 321 of file ojph_file.cpp.

References mem_infile(), and swap().

## Member Function Documentation

## ◆ close()

void ojph::mem_infile::close | ( |  | ) |
| inline override virtual

Reimplemented from ojph::infile_base.

Definition at line 336 of file ojph_file.h.

References cur_ptr, data, and size.

Referenced by mem_infile().

## ◆ eof()

bool ojph::mem_infile::eof | ( |  | ) |
| inline override virtual

Implements ojph::infile_base.

Definition at line 335 of file ojph_file.h.

References cur_ptr, data, and size.

## ◆ open()

void ojph::mem_infile::open | ( | const ui8 * | data,
|  | size_t | size )

Definition at line 337 of file ojph_file.cpp.

References cur_ptr, data, and size.

Referenced by cpp_init_j2c_data(), LLVMFuzzerTestOneInput(), and operator=().

## ◆ operator=() [1/2]

mem_infile & ojph::mem_infile::operator= | ( | mem_infile && | rhs | ) |
| noexcept

move assignment with the same ownership transfer semantics as move construction.

Definition at line 327 of file ojph_file.cpp.

References mem_infile(), and swap().

## ◆ operator=() [2/2]

mem_infile & ojph::mem_infile::operator= | ( | mem_infile const & |  | ) |
| delete

References data, mem_infile(), open(), read(), seek(), and size.

## ◆ read()

size_t ojph::mem_infile::read | ( | void * | ptr,
|  | size_t | size )
| override virtual

Implements ojph::infile_base.

Definition at line 345 of file ojph_file.cpp.

References cur_ptr, data, ojph_min, and size.

Referenced by operator=().

## ◆ seek()

int ojph::mem_infile::seek | ( | si64 | offset,
|  | enum infile_base::seek | origin )
| override virtual

Implements ojph::infile_base.

Definition at line 360 of file ojph_file.cpp.

References cur_ptr, data, ojph::infile_base::OJPH_SEEK_CUR, ojph::infile_base::OJPH_SEEK_END, ojph::infile_base::OJPH_SEEK_SET, and size.

Referenced by operator=().

## ◆ swap()

void ojph::mem_infile::swap | ( | mem_infile & | other | ) |
| private noexcept

Definition at line 395 of file ojph_file.cpp.

References cur_ptr, data, mem_infile(), and size.

Referenced by mem_infile(), and operator=().

## ◆ tell()

si64 ojph::mem_infile::tell | ( |  | ) |
| inline override virtual

Implements ojph::infile_base.

Definition at line 334 of file ojph_file.h.

References cur_ptr, data, and tell().

Referenced by tell().

## Member Data Documentation

## ◆ cur_ptr

const ui8 * ojph::mem_infile::cur_ptr
| private

Definition at line 342 of file ojph_file.h.

Referenced by close(), eof(), open(), read(), seek(), swap(), and tell().

## ◆ data

const ui8* ojph::mem_infile::data
| private

Definition at line 342 of file ojph_file.h.

Referenced by close(), eof(), open(), operator=(), read(), seek(), swap(), and tell().

## ◆ size

size_t ojph::mem_infile::size
| private

Definition at line 343 of file ojph_file.h.

Referenced by close(), eof(), open(), operator=(), read(), seek(), and swap().

The documentation for this class was generated from the following files:

- /build/openjph/src/OpenJPH/src/core/openjph/ojph_file.h
- /build/openjph/src/OpenJPH/src/core/others/ojph_file.cpp