libdcp
Public Member Functions | Private Attributes | List of all members
dcp::ArrayData Class Reference

Class to hold an arbitrary block of data. More...

#include <array_data.h>

Inheritance diagram for dcp::ArrayData:
dcp::Data

Public Member Functions

 ArrayData (int size)
 
 ArrayData (uint8_t const *data, int size)
 
 ArrayData (boost::filesystem::path file)
 
uint8_t const * data () const override
 
uint8_t * data () override
 
int size () const override
 
void set_size (int s)
 
- Public Member Functions inherited from dcp::Data
void write (boost::filesystem::path file) const
 
void write_via_temp (boost::filesystem::path temp, boost::filesystem::path final) const
 

Private Attributes

std::shared_ptr< std::vector< uint8_t > > _data
 

Detailed Description

Class to hold an arbitrary block of data.

Definition at line 54 of file array_data.h.

Constructor & Destructor Documentation

◆ ArrayData()

ArrayData::ArrayData ( boost::filesystem::path  file)
explicit

Create an ArrayData by reading the contents of a file

Parameters
fileFilename to read

Definition at line 73 of file array_data.cc.

Member Function Documentation

◆ set_size()

void dcp::ArrayData::set_size ( int  s)
inline

Set the size that will be returned from size()

Definition at line 82 of file array_data.h.

◆ size()

int dcp::ArrayData::size ( ) const
inlineoverridevirtual
Returns
size of the data in _data, or whatever was last passed to a set_size() call

Implements dcp::Data.

Definition at line 77 of file array_data.h.


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