libdap::PipeResponse Class Reference

Encapsulate a response. This class provides special treatment for 'stream pipes.' It arranges to close them using pclose() instead of fclose(). More...

`#include <PipeResponse.h>`

Inheritance diagram for libdap::PipeResponse:

## Public Member Functions

virtual FILE * | get_stream () const
| PipeResponse (FILE *s)
| Initialize with a stream returned by popen().
virtual void | set_stream (FILE *s)
virtual | ~PipeResponse ()
getters
virtual int | get_status () const
virtual std::istream * | get_cpp_stream () const
virtual ObjectType | get_type () const
virtual std::string | get_version () const
virtual std::string | get_protocol () const
setters
virtual void | set_status (int s)
virtual void | set_cpp_stream (std::istream *s)
virtual void | set_type (ObjectType o)
virtual void | set_version (const std::string &v)
virtual void | set_protocol (const std::string &p)

## Detailed Description

Encapsulate a response. This class provides special treatment for 'stream pipes.' It arranges to close them using pclose() instead of fclose().

Definition at line 46 of file PipeResponse.h.

## Constructor & Destructor Documentation

## PipeResponse()

libdap::PipeResponse::PipeResponse | ( | FILE * | s | ) |

inline

Initialize with a stream returned by popen().

Create an instance initialized to a stream returned by popen(). By default get_type() and get_version() return default values of unknown_type and "dods/0.0", respectively. Note that this class closes the stream.

    @note Since Unix provides no easy way to differentiate between a
    FILE* returned by fopen() or popen(), you're on your own here. Make
    sure you use the correct type of FILE Pointer.

    @see Response

    @param s Pointer to a pipe stream returned by popen().

Definition at line 67 of file PipeResponse.h.

## ~PipeResponse()

virtual libdap::PipeResponse::~PipeResponse | ( |  | ) |

inline virtual

Close the stream.

Definition at line 70 of file PipeResponse.h.

## Member Function Documentation

## get_cpp_stream()

virtual std::istream * libdap::Response::get_cpp_stream | ( |  | ) | const

inline virtual inherited

Definition at line 105 of file Response.h.

## get_protocol()

virtual std::string libdap::Response::get_protocol | ( |  | ) | const

inline virtual inherited

Definition at line 109 of file Response.h.

## get_status()

virtual int libdap::Response::get_status | ( |  | ) | const

inline virtual inherited

Definition at line 103 of file Response.h.

## get_stream()

virtual FILE * libdap::PipeResponse::get_stream | ( |  | ) | const

inline virtual

Reimplemented from libdap::Response.

Definition at line 75 of file PipeResponse.h.

## get_type()

virtual ObjectType libdap::Response::get_type | ( |  | ) | const

inline virtual inherited

Definition at line 107 of file Response.h.

## get_version()

virtual std::string libdap::Response::get_version | ( |  | ) | const

inline virtual inherited

Definition at line 108 of file Response.h.

## set_cpp_stream()

virtual void libdap::Response::set_cpp_stream | ( | std::istream * | s | ) |

inline virtual inherited

Definition at line 117 of file Response.h.

## set_protocol()

virtual void libdap::Response::set_protocol | ( | const std::string & | p | ) |

inline virtual inherited

Definition at line 121 of file Response.h.

## set_status()

virtual void libdap::Response::set_status | ( | int | s | ) |

inline virtual inherited

Definition at line 114 of file Response.h.

## set_stream()

virtual void libdap::PipeResponse::set_stream | ( | FILE * | s | ) |

inline virtual

Reimplemented from libdap::Response.

Definition at line 76 of file PipeResponse.h.

## set_type()

virtual void libdap::Response::set_type | ( | ObjectType | o | ) |

inline virtual inherited

Definition at line 119 of file Response.h.

## set_version()

virtual void libdap::Response::set_version | ( | const std::string & | v | ) |

inline virtual inherited

Definition at line 120 of file Response.h.

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

- PipeResponse.h