used to easily construct vgfx Requests More...
#include <request.h>
Public Member Functions | |
Request (void) | |
void | close (void) |
std::string | get (void) |
void | addBezier (IN const char *id, IN float x0, IN float ax, IN float bx, IN float cx, IN float y0, IN float ay, IN float by, IN float cy) |
void | addQuadBezier (IN const char *id, IN const point_t &p0, IN const point_t &p1, IN const point_t &p2) |
void | addRect (IN const char *id, IN float left, IN float top, IN float right, IN float bottom, IN bool fill) |
void | addSimpleRect (IN const char *id, IN float width, IN float height, IN bool fill) |
void | addText (IN const char *id, IN const char *text) |
void | addSimpleGroup (IN const char *id) |
void | addMeta (IN const char *group_id, IN const char *name, IN const char *value) |
void | addObject (IN const char *group_id, IN const char *tag, IN const char *ref, IN float x, IN float y, IN float z, IN float phi=0.0) |
void | setDictionary (IN const char *path, IN const dictionary_t &data) |
void | removeObject (IN const char *path) |
std::ostream & | getStream (void) |
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.
vgfx::Request::Request | ( | void | ) | [inline] |
Definition at line 60 of file vgfx/request.h.
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 | ( | IN const char * | id, | |
IN float | x0, | |||
IN float | ax, | |||
IN float | bx, | |||
IN float | cx, | |||
IN float | y0, | |||
IN float | ay, | |||
IN float | by, | |||
IN float | cy | |||
) | [inline] |
Definition at line 76 of file vgfx/request.h.
void vgfx::Request::addQuadBezier | ( | IN const char * | id, | |
IN const point_t & | p0, | |||
IN const point_t & | p1, | |||
IN const point_t & | p2 | |||
) | [inline] |
Definition at line 88 of file vgfx/request.h.
void vgfx::Request::addRect | ( | IN const char * | id, | |
IN float | left, | |||
IN float | top, | |||
IN float | right, | |||
IN float | bottom, | |||
IN bool | fill | |||
) | [inline] |
Definition at line 99 of file vgfx/request.h.
void vgfx::Request::addSimpleRect | ( | IN const char * | id, | |
IN float | width, | |||
IN float | height, | |||
IN bool | fill | |||
) | [inline] |
Definition at line 113 of file vgfx/request.h.
void vgfx::Request::addText | ( | IN const char * | id, | |
IN const char * | text | |||
) | [inline] |
Definition at line 118 of file vgfx/request.h.
void vgfx::Request::addSimpleGroup | ( | IN const char * | id | ) | [inline] |
Definition at line 124 of file vgfx/request.h.
void vgfx::Request::addMeta | ( | IN const char * | group_id, | |
IN const char * | name, | |||
IN const char * | value | |||
) | [inline] |
Definition at line 131 of file vgfx/request.h.
void vgfx::Request::addObject | ( | IN const char * | group_id, | |
IN const char * | tag, | |||
IN const char * | ref, | |||
IN float | x, | |||
IN float | y, | |||
IN float | z, | |||
IN float | phi = 0.0 | |||
) | [inline] |
Definition at line 139 of file vgfx/request.h.
void vgfx::Request::setDictionary | ( | IN const char * | path, | |
IN const dictionary_t & | data | |||
) | [inline] |
Definition at line 151 of file vgfx/request.h.
void vgfx::Request::removeObject | ( | IN 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.