Scroom 0.14-49-gb7ae7a6d
Loading...
Searching...
No Matches
anonymous_namespace{pnmsource.cc} Namespace Reference

Functions

bool approx (const BitmapMetaData &left, const BitmapMetaData &right)
 
void skipComments (std::istream &s)
 
void consumeDataBoundary (std::istream &s)
 

Function Documentation

◆ approx()

bool anonymous_namespace{pnmsource.cc}::approx ( const BitmapMetaData left,
const BitmapMetaData right 
)
22 {
23 return left.type == right.type && left.bitsPerSample == right.bitsPerSample && left.samplesPerPixel == right.samplesPerPixel
24 && left.rect == right.rect && static_cast<bool>(left.colormapHelper) == static_cast<bool>(right.colormapHelper);
25 }
Segment< int > const right(3, 7)
std::string type
Definition opentiledbitmapinterface.hh:44
ColormapHelperBase::Ptr colormapHelper
Definition opentiledbitmapinterface.hh:49
unsigned int bitsPerSample
Definition opentiledbitmapinterface.hh:45
unsigned int samplesPerPixel
Definition opentiledbitmapinterface.hh:46
Scroom::Utils::Rectangle< int > rect
Definition opentiledbitmapinterface.hh:47

◆ consumeDataBoundary()

void anonymous_namespace{pnmsource.cc}::consumeDataBoundary ( std::istream &  s)
36 {
37 // The last header token is followed by exactly one whitespace character.
38 // That character may be the newline ending a comment line.
39 if(s.get() == '#')
40 {
41 s.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
42 }
43 }
BitmapSurface::Ptr const s
Definition transformpresentation_test.cc:70

◆ skipComments()

void anonymous_namespace{pnmsource.cc}::skipComments ( std::istream &  s)
28 {
29 while((s >> std::ws).peek() == '#')
30 {
31 s.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
32 }
33 }