RAPP Platform API
 All Classes Namespaces Files Functions Variables Typedefs
rapp::object::picture Class Reference

class which wraps around raw bytes of a picture More...

#include <picture.hpp>

Public Member Functions

 picture (const std::string filepath)
 Construct from a file-path. More...
 
 picture (std::ifstream &bytestream)
 Construct using an open file stream. More...
 
 picture (const picture &)=default
 Copy constructor. More...
 
std::vector< rapp::types::bytebytearray () const
 Get picture as array of bytes. More...
 
pictureoperator= (const picture &)=default
 Assignment operator. More...
 
bool operator== (const picture &rhs) const
 picture equality More...
 
bool save (const std::string filepath)
 Save picture to filepath. More...
 
std::string type () const
 try and get image type (JPG/PNG supported) More...
 

Private Types

typedef char byte
 

Private Member Functions

 picture ()=delete
 
void opencb_ (std::ifstream &bytestream)
 

Private Attributes

std::vector< rapp::types::bytebytearray_
 
std::string imgtype_
 

Detailed Description

class which wraps around raw bytes of a picture

Version
3
Date
January 2016
Author
Alex Gkiokas a.gki.nosp@m.okas.nosp@m.@orte.nosp@m.lio..nosp@m.co.uk

Definition at line 13 of file picture.hpp.

Member Typedef Documentation

typedef char rapp::object::picture::byte
private

Definition at line 74 of file picture.hpp.

Constructor & Destructor Documentation

rapp::object::picture::picture ( const std::string  filepath)

Construct from a file-path.

Definition at line 18 of file picture.hpp.

rapp::object::picture::picture ( std::ifstream &  bytestream)

Construct using an open file stream.

Definition at line 29 of file picture.hpp.

rapp::object::picture::picture ( const picture )
default

Copy constructor.

rapp::object::picture::picture ( )
privatedelete

Member Function Documentation

std::vector<rapp::types::byte> rapp::object::picture::bytearray ( ) const

Get picture as array of bytes.

Definition at line 47 of file picture.hpp.

void rapp::object::picture::opencb_ ( std::ifstream &  bytestream)
private

Definition at line 80 of file picture.hpp.

picture& rapp::object::picture::operator= ( const picture )
default

Assignment operator.

bool rapp::object::picture::operator== ( const picture rhs) const

picture equality

Definition at line 41 of file picture.hpp.

bool rapp::object::picture::save ( const std::string  filepath)

Save picture to filepath.

Definition at line 59 of file picture.hpp.

std::string rapp::object::picture::type ( ) const

try and get image type (JPG/PNG supported)

Definition at line 53 of file picture.hpp.

Member Data Documentation

std::vector<rapp::types::byte> rapp::object::picture::bytearray_
private

Definition at line 97 of file picture.hpp.

std::string rapp::object::picture::imgtype_
private

Definition at line 98 of file picture.hpp.


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