QCAD Application Framework
CAD Application Development and Automation.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DL_Attributes Class Reference

Storing and passing around attributes. More...

#include <dl_attributes.h>

List of all members.

Public Member Functions

 DL_Attributes ()
 Default constructor.
 DL_Attributes (const string &layer, int color, int width, const string &lineType)
 Constructor for DXF attributes.
 DL_Attributes (const string &layer, int color, int color24, int width, const string &lineType)
 Constructor for DXF attributes.
int getColor () const
int getColor24 () const
string getLayer () const
string getLineType () const
int getWidth () const
DL_Attributes operator= (const DL_Attributes &attrib)
 Copies attributes (deep copies) from another attribute object.
void setColor (int color)
 Sets the color.
void setColor24 (int color)
 Sets the 24bit color.
void setLayer (const string &layer)
 Sets the layer.
void setLineType (const string &lineType)
 Sets the line type.
void setWidth (int width)
 Sets the width.

Private Attributes

int color
int color24
string layer
string lineType
int width

Detailed Description

Storing and passing around attributes.

Attributes are the layer name, color, width and line type.

Author:
Andrew Mustun

Constructor & Destructor Documentation

DL_Attributes::DL_Attributes ( )
inline

Default constructor.

DL_Attributes::DL_Attributes ( const string &  layer,
int  color,
int  width,
const string &  lineType 
)
inline

Constructor for DXF attributes.

Parameters:
layerLayer name for this entity or NULL for no layer (every entity should be on a named layer!).
colorColor number (0..256). 0 = BYBLOCK, 256 = BYLAYER.
widthLine thickness. Defaults to zero. -1 = BYLAYER, -2 = BYBLOCK, -3 = default width
lineTypeLine type name or "BYLAYER" or "BYBLOCK". Defaults to "BYLAYER"
DL_Attributes::DL_Attributes ( const string &  layer,
int  color,
int  color24,
int  width,
const string &  lineType 
)
inline

Constructor for DXF attributes.

Parameters:
layerLayer name for this entity or NULL for no layer (every entity should be on a named layer!).
colorColor number (0..256). 0 = BYBLOCK, 256 = BYLAYER.
color2424 bit color (see DXF reference).
widthLine thickness. Defaults to zero. -1 = BYLAYER, -2 = BYBLOCK, -3 = default width
lineTypeLine type name or "BYLAYER" or "BYBLOCK". Defaults to "BYLAYER"

Member Function Documentation

int DL_Attributes::getColor ( ) const
inline
Returns:
Color.
See also:
DL_Codes, dxfColors
int DL_Attributes::getColor24 ( ) const
inline
Returns:
24 bit color or -1 if no 24bit color is defined.
See also:
DL_Codes, dxfColors
string DL_Attributes::getLayer ( ) const
inline
Returns:
Layer name.
string DL_Attributes::getLineType ( ) const
inline
Returns:
Line type.
int DL_Attributes::getWidth ( ) const
inline
Returns:
Width.
DL_Attributes DL_Attributes::operator= ( const DL_Attributes attrib)
inline

Copies attributes (deep copies) from another attribute object.

void DL_Attributes::setColor ( int  color)
inline

Sets the color.

See also:
DL_Codes, dxfColors
void DL_Attributes::setColor24 ( int  color)
inline

Sets the 24bit color.

See also:
DL_Codes, dxfColors
void DL_Attributes::setLayer ( const string &  layer)
inline

Sets the layer.

If the given pointer points to NULL, the new layer name will be an empty but valid string.

void DL_Attributes::setLineType ( const string &  lineType)
inline

Sets the line type.

This can be any string and is not checked to be a valid line type.

void DL_Attributes::setWidth ( int  width)
inline

Sets the width.


Member Data Documentation

int DL_Attributes::color
private
int DL_Attributes::color24
private
string DL_Attributes::layer
private
string DL_Attributes::lineType
private
int DL_Attributes::width
private

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