hex::svg::Identity Class Reference

#include <hex.h>

Inheritance diagram for hex::svg::Identity:

hex::Area hex::Boundary hex::Path List of all members.

Detailed Description

Parent class for objects that can have an id, SVG style & SVG class name.

Definition at line 149 of file hex.h.

Public Member Functions

virtual ~Identity (void)
std::string attributes (void) const
 Helper, used by child types to render attributes into SVG.

Public Attributes

std::string id
std::string style
std::string className


Constructor & Destructor Documentation

virtual hex::svg::Identity::~Identity ( void   )  [inline, virtual]

Definition at line 155 of file hex.h.

00155 {}


Member Function Documentation

std::string hex::svg::Identity::attributes ( void   )  const

Helper, used by child types to render attributes into SVG.

Definition at line 129 of file svg.cc.

References className, and style.

Referenced by hex::svg::Document::draw_complex_area(), hex::svg::Document::draw_poly(), and hex::svg::Document::draw_skeleton().

00130 {
00131   std::string result ="";
00132   if(!this->id.empty())
00133       result += std::string(" id=\"") + this->id + "\"";
00134   if(!this->style.empty())
00135       result += std::string(" style=\"") + this->style + "\"";
00136   if(!this->className.empty())
00137       result += std::string(" class=\"") + this->className + "\"";
00138   return result;
00139 }


Member Data Documentation

std::string hex::svg::Identity::id

Definition at line 152 of file hex.h.

std::string hex::svg::Identity::style

Definition at line 153 of file hex.h.

Referenced by attributes(), and main().

std::string hex::svg::Identity::className

Definition at line 154 of file hex.h.

Referenced by attributes().


The documentation for this class was generated from the following files:
Generated on Thu Feb 21 00:00:55 2008 for libhex by  doxygen 1.5.1