Public Member Functions | Private Member Functions | Private Attributes | Related Functions | List of all members
vil_stream_url Class Reference

open an URL. More...

#include <vil_stream_url.h>

Inheritance diagram for vil_stream_url:
Inheritance graph
[legend]

Public Member Functions

 vil_stream_url (char const *)
 
 ~vil_stream_url () override
 
bool ok () const override
 Return false if the stream is broken. More...
 
vil_streampos write (void const *buf, vil_streampos n) override
 Write n bytes from buf. Returns number of bytes written. More...
 
vil_streampos read (void *buf, vil_streampos n) override
 Read n bytes into buf. Returns number of bytes read. More...
 
vil_streampos tell () const override
 Return file pointer. More...
 
void seek (vil_streampos position) override
 Goto file pointer. More...
 
vil_streampos file_size () const override
 Amount of data in the stream. More...
 
void ref ()
 up/down the reference count. More...
 
void unref ()
 

Private Member Functions

 vil_stream_url (vil_stream_url const &)
 
vil_stream_urloperator= (vil_stream_url const &)
 

Private Attributes

vil_streamu_
 

Related Functions

(Note that these are not member functions.)

vil_streamvil_open (char const *what, char const *how="r")
 make a vil_stream from a filename, an URL, etc. More...
 
float vil_stream_read_big_endian_float (vil_stream *is)
 Reads in a 4-byte big-endian float. More...
 
void vil_stream_read_big_endian_int_16 (vil_stream *is, vxl_uint_16 *data, unsigned n)
 Reads in n 16 bit unsigned ints. More...
 
void vil_stream_write_big_endian_uint_16 (vil_stream *, vxl_uint_16)
 
void vil_stream_write_little_endian_uint_16 (vil_stream *, vxl_uint_16)
 
void vil_stream_write_big_endian_uint_32 (vil_stream *, vxl_uint_32)
 
void vil_stream_write_little_endian_uint_32 (vil_stream *, vxl_uint_32)
 
void vil_stream_write_big_endian_int_32 (vil_stream *, vxl_int_32)
 
void vil_stream_write_little_endian_int_32 (vil_stream *, vxl_int_32)
 

Detailed Description

open an URL.

Definition at line 13 of file vil_stream_url.h.

Constructor & Destructor Documentation

◆ vil_stream_url() [1/2]

vil_stream_url::vil_stream_url ( vil_stream_url const &  )
inlineprivate

Definition at line 18 of file vil_stream_url.h.

◆ vil_stream_url() [2/2]

vil_stream_url::vil_stream_url ( char const *  url)

Definition at line 114 of file vil_stream_url.cxx.

◆ ~vil_stream_url()

vil_stream_url::~vil_stream_url ( )
override

Definition at line 319 of file vil_stream_url.cxx.

Member Function Documentation

◆ file_size()

vil_streampos vil_stream_url::file_size ( ) const
inlineoverridevirtual

Amount of data in the stream.

Implements vil_stream.

Definition at line 32 of file vil_stream_url.h.

◆ ok()

bool vil_stream_url::ok ( ) const
inlineoverridevirtual

Return false if the stream is broken.

Implements vil_stream.

Definition at line 25 of file vil_stream_url.h.

◆ operator=()

vil_stream_url& vil_stream_url::operator= ( vil_stream_url const &  )
inlineprivate

Definition at line 19 of file vil_stream_url.h.

◆ read()

vil_streampos vil_stream_url::read ( void *  buf,
vil_streampos  n 
)
inlineoverridevirtual

Read n bytes into buf. Returns number of bytes read.

The return value is less than n only at eof.

Implements vil_stream.

Definition at line 28 of file vil_stream_url.h.

◆ ref()

void vil_stream::ref ( )
inlineinherited

up/down the reference count.

Definition at line 45 of file vil_stream.h.

◆ seek()

void vil_stream_url::seek ( vil_streampos  position)
inlineoverridevirtual

Goto file pointer.

Implements vil_stream.

Definition at line 30 of file vil_stream_url.h.

◆ tell()

vil_streampos vil_stream_url::tell ( ) const
inlineoverridevirtual

Return file pointer.

Implements vil_stream.

Definition at line 29 of file vil_stream_url.h.

◆ unref()

void vil_stream::unref ( )
inherited

Definition at line 31 of file vil_stream.cxx.

◆ write()

vil_streampos vil_stream_url::write ( void const *  buf,
vil_streampos  n 
)
inlineoverridevirtual

Write n bytes from buf. Returns number of bytes written.

The return value is less than n only in case of device failure.

Implements vil_stream.

Definition at line 26 of file vil_stream_url.h.

Friends And Related Function Documentation

◆ vil_open()

vil_stream * vil_open ( char const *  what,
char const *  how = "r" 
)
related

make a vil_stream from a filename, an URL, etc.

Definition at line 18 of file vil_open.cxx.

◆ vil_stream_read_big_endian_float()

float vil_stream_read_big_endian_float ( vil_stream is)
related

Reads in a 4-byte big-endian float.

Definition at line 122 of file vil_stream_read.cxx.

◆ vil_stream_read_big_endian_int_16()

void vil_stream_read_big_endian_int_16 ( vil_stream is,
vxl_uint_16 *  data,
unsigned  n 
)
related

Reads in n 16 bit unsigned ints.

Caller is responsible for allocating enough space.

Definition at line 134 of file vil_stream_read.cxx.

◆ vil_stream_write_big_endian_int_32()

void vil_stream_write_big_endian_int_32 ( vil_stream ,
vxl_int_32   
)
related

Definition at line 50 of file vil_stream_write.cxx.

◆ vil_stream_write_big_endian_uint_16()

void vil_stream_write_big_endian_uint_16 ( vil_stream ,
vxl_uint_16   
)
related

Definition at line 14 of file vil_stream_write.cxx.

◆ vil_stream_write_big_endian_uint_32()

void vil_stream_write_big_endian_uint_32 ( vil_stream ,
vxl_uint_32   
)
related

Definition at line 30 of file vil_stream_write.cxx.

◆ vil_stream_write_little_endian_int_32()

void vil_stream_write_little_endian_int_32 ( vil_stream ,
vxl_int_32   
)
related

Definition at line 60 of file vil_stream_write.cxx.

◆ vil_stream_write_little_endian_uint_16()

void vil_stream_write_little_endian_uint_16 ( vil_stream ,
vxl_uint_16   
)
related

Definition at line 22 of file vil_stream_write.cxx.

◆ vil_stream_write_little_endian_uint_32()

void vil_stream_write_little_endian_uint_32 ( vil_stream ,
vxl_uint_32   
)
related

Definition at line 40 of file vil_stream_write.cxx.

Member Data Documentation

◆ u_

vil_stream* vil_stream_url::u_
private

Definition at line 15 of file vil_stream_url.h.


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