OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Public Types | Public Member Functions | Public Attributes | List of all members
ossimWebResponse Class Referenceabstract

#include <ossimWebResponse.h>

Inheritance diagram for ossimWebResponse:
ossimObject ossimReferenced ossimHttpResponse ossimCurlHttpResponse

Public Types

typedef std::vector< char > ByteBuffer
 

Public Member Functions

 ossimWebResponse ()
 
virtual std::istream * getInputStream ()=0
 This might have to change in the future if we start doing other protocols such as ftp scp, ... More...
 
void copyAllDataFromInputStream (ByteBuffer &buffer)
 
- Public Member Functions inherited from ossimObject
 ossimObject ()
 
virtual ~ossimObject ()
 
virtual ossimObjectdup () const
 
virtual ossimString getShortName () const
 
virtual ossimString getLongName () const
 
virtual ossimString getDescription () const
 
virtual ossimString getClassName () const
 
virtual RTTItypeid getType () const
 
virtual bool canCastTo (ossimObject *obj) const
 
virtual bool canCastTo (const RTTItypeid &id) const
 
virtual bool canCastTo (const ossimString &parentClassName) const
 
virtual bool saveState (ossimKeywordlist &kwl, const char *prefix=0) const
 
virtual bool loadState (const ossimKeywordlist &kwl, const char *prefix=0)
 
virtual std::ostream & print (std::ostream &out) const
 Generic print method. More...
 
virtual bool isEqualTo (const ossimObject &obj, ossimCompareType compareType=OSSIM_COMPARE_FULL) const
 
virtual void accept (ossimVisitor &visitor)
 
- Public Member Functions inherited from ossimReferenced
 ossimReferenced ()
 
 ossimReferenced (const ossimReferenced &)
 
ossimReferencedoperator= (const ossimReferenced &)
 
void ref () const
 increment the reference count by one, indicating that this object has another pointer which is referencing it. More...
 
void unref () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
void unref_nodelete () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
int referenceCount () const
 

Public Attributes

 TYPE_DATA
 

Additional Inherited Members

- Protected Member Functions inherited from ossimReferenced
virtual ~ossimReferenced ()
 

Detailed Description

Definition at line 7 of file ossimWebResponse.h.

Member Typedef Documentation

◆ ByteBuffer

typedef std::vector<char> ossimWebResponse::ByteBuffer

Definition at line 10 of file ossimWebResponse.h.

Constructor & Destructor Documentation

◆ ossimWebResponse()

ossimWebResponse::ossimWebResponse ( )
inline

Definition at line 11 of file ossimWebResponse.h.

11 :ossimObject(){}

Member Function Documentation

◆ copyAllDataFromInputStream()

void ossimWebResponse::copyAllDataFromInputStream ( ByteBuffer buffer)

Definition at line 6 of file ossimWebResponse.cpp.

References getInputStream().

Referenced by ossim::CurlStreamBuffer::loadBlock().

7 {
8  std::istream* input = getInputStream();
9 
10  if(input)
11  {
12  input->seekg(0, std::ios::beg);
13  char buf[1024];
14  while(!input->eof()&&input->good())
15  {
16  input->read(buf, 1024);
17  int gcount = input->gcount();
18  if(gcount)
19  {
20  buffer.insert(buffer.end(), buf , buf + gcount);
21  }
22  }
23  }
24 }
virtual std::istream * getInputStream()=0
This might have to change in the future if we start doing other protocols such as ftp scp...
std::basic_istream< char > istream
Base class for char input streams.
Definition: ossimIosFwd.h:20

◆ getInputStream()

virtual std::istream* ossimWebResponse::getInputStream ( )
pure virtual

This might have to change in the future if we start doing other protocols such as ftp scp, ...

etc.

We currently will return the main input stream that can be used to read the bytes returned from the request. If you need access to say a header stream from an http protocol then you can dynamic_cast to an ossimHttpResponse.

Implemented in ossimHttpResponse.

Referenced by copyAllDataFromInputStream().

Member Data Documentation

◆ TYPE_DATA

ossimWebResponse::TYPE_DATA

Definition at line 25 of file ossimWebResponse.h.


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