Public Member Functions | Private Attributes

vgfx::Request Class Reference
[Vector Graphics Engine]

used to easily construct vgfx Requests More...

#include <request.h>

List of all members.

Public Member Functions

 Request (void)
void close (void)
std::string get (void)
void addBezier (const char *id, float x0, float ax, float bx, float cx, float y0, float ay, float by, float cy)
void addQuadBezier (const char *id, const point_t &p0, const point_t &p1, const point_t &p2)
void addRect (const char *id, float left, float top, float right, float bottom, bool fill)
void addSimpleRect (const char *id, float width, float height, bool fill)
void addText (const char *id, const char *text)
void addSimpleGroup (const char *id)
void addMeta (const char *group_id, const char *name, const char *value)
void addObject (const char *group_id, const char *tag, const char *ref, float x, float y, float z, float phi=0.0)
void setDictionary (const char *path, const dictionary_t &data)
void removeObject (const char *path)
std::ostream & getStream (void)

Private Attributes

std::ostringstream m_stream
bool m_closed

Detailed Description

used to easily construct vgfx Requests

To use, create one of these, add a bunch of stuff, and then call get(). That closes the request and returns a string containing the full request.

Note that once a request has been closed, you cannot add any more objects to it! Subsequent addXXX() calls will fail (program crash, since to do so is a programming mistake).

Definition at line 58 of file vgfx/request.h.

Constructor & Destructor Documentation

vgfx::Request::Request ( void   )  [inline]

Definition at line 60 of file vgfx/request.h.

Member Function Documentation

void vgfx::Request::close ( void   )  [inline]

Definition at line 64 of file vgfx/request.h.

std::string vgfx::Request::get ( void   )  [inline]

Definition at line 71 of file vgfx/request.h.

void vgfx::Request::addBezier ( const char *  id,
float  x0,
float  ax,
float  bx,
float  cx,
float  y0,
float  ay,
float  by,
float  cy 
) [inline]

Definition at line 76 of file vgfx/request.h.

void vgfx::Request::addQuadBezier ( const char *  id,
const point_t p0,
const point_t p1,
const point_t p2 
) [inline]

Definition at line 88 of file vgfx/request.h.

void vgfx::Request::addRect ( const char *  id,
float  left,
float  top,
float  right,
float  bottom,
bool  fill 
) [inline]

Definition at line 99 of file vgfx/request.h.

void vgfx::Request::addSimpleRect ( const char *  id,
float  width,
float  height,
bool  fill 
) [inline]

Definition at line 113 of file vgfx/request.h.

void vgfx::Request::addText ( const char *  id,
const char *  text 
) [inline]

Definition at line 118 of file vgfx/request.h.

void vgfx::Request::addSimpleGroup ( const char *  id  )  [inline]

Definition at line 124 of file vgfx/request.h.

void vgfx::Request::addMeta ( const char *  group_id,
const char *  name,
const char *  value 
) [inline]

Definition at line 131 of file vgfx/request.h.

void vgfx::Request::addObject ( const char *  group_id,
const char *  tag,
const char *  ref,
float  x,
float  y,
float  z,
float  phi = 0.0 
) [inline]

Definition at line 139 of file vgfx/request.h.

void vgfx::Request::setDictionary ( const char *  path,
const dictionary_t data 
) [inline]

Definition at line 151 of file vgfx/request.h.

void vgfx::Request::removeObject ( const char *  path  )  [inline]

Definition at line 162 of file vgfx/request.h.

std::ostream& vgfx::Request::getStream ( void   )  [inline]

Definition at line 167 of file vgfx/request.h.

Member Data Documentation

std::ostringstream vgfx::Request::m_stream [private]

Definition at line 173 of file vgfx/request.h.

bool vgfx::Request::m_closed [private]

Definition at line 174 of file vgfx/request.h.

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