degate  0.1.2
Public Member Functions | Private Attributes
degate::ColoredObject Class Reference

Represents an object that has a frame and a fill color. More...

#include <ColoredObject.h>

Inheritance diagram for degate::ColoredObject:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 ColoredObject ()
virtual ~ColoredObject ()
virtual bool has_frame_color () const
 Is there a frame color definition.
virtual bool has_fill_color () const
 Is there a fill color definition.
virtual color_t get_frame_color () const
 Get the frame color.
virtual color_t get_fill_color () const
 Get the fill color.
virtual void set_frame_color (color_t c)
 Set the frame color.
virtual void set_fill_color (color_t c)
 Set the fill color.
void cloneDeepInto (DeepCopyable_shptr dest, oldnew_t *oldnew) const
 Deep-copy all members to destination.

Private Attributes

color_t fill_color
color_t frame_color

Detailed Description

Represents an object that has a frame and a fill color.

Definition at line 34 of file ColoredObject.h.


Constructor & Destructor Documentation

Definition at line 40 of file ColoredObject.h.

: fill_color(0), frame_color(0) {}
virtual degate::ColoredObject::~ColoredObject ( ) [inline, virtual]

Definition at line 41 of file ColoredObject.h.

{}

Member Function Documentation

void degate::ColoredObject::cloneDeepInto ( DeepCopyable_shptr  destination,
oldnew_t oldnew 
) const [inline, virtual]

Deep-copy all members to destination.

Todo:
Find out whether the default assignment operator can be used to simplify implementations of this method.

Implements degate::DeepCopyableBase.

Reimplemented in degate::GateTemplate, degate::Annotation, degate::Gate, degate::GateTemplatePort, degate::GatePort, degate::Via, degate::PlacedLogicModelObject, degate::EMarker, degate::ConnectedLogicModelObject, and degate::Wire.

Definition at line 44 of file ColoredObject.h.

References fill_color, and frame_color.

                                                                        {
      auto clone = std::dynamic_pointer_cast<ColoredObject>(dest);
      clone->fill_color = fill_color;
      clone->frame_color = frame_color;
    };
virtual color_t degate::ColoredObject::get_fill_color ( ) const [inline, virtual]

Get the fill color.

Definition at line 69 of file ColoredObject.h.

References fill_color.

{ return fill_color; }
virtual color_t degate::ColoredObject::get_frame_color ( ) const [inline, virtual]

Get the frame color.

Definition at line 64 of file ColoredObject.h.

References frame_color.

{ return frame_color; }
virtual bool degate::ColoredObject::has_fill_color ( ) const [inline, virtual]

Is there a fill color definition.

Definition at line 59 of file ColoredObject.h.

References fill_color.

{ return fill_color != 0; }
virtual bool degate::ColoredObject::has_frame_color ( ) const [inline, virtual]

Is there a frame color definition.

Definition at line 54 of file ColoredObject.h.

References frame_color.

{ return frame_color != 0; }
virtual void degate::ColoredObject::set_fill_color ( color_t  c) [inline, virtual]

Set the fill color.

Definition at line 80 of file ColoredObject.h.

References fill_color.

Referenced by degate::Gate::remove_template(), and degate::Gate::set_gate_template().

{ fill_color = c; }

Here is the caller graph for this function:

virtual void degate::ColoredObject::set_frame_color ( color_t  c) [inline, virtual]

Set the frame color.

Definition at line 75 of file ColoredObject.h.

References frame_color.

Referenced by degate::Gate::remove_template(), and degate::Gate::set_gate_template().

{ frame_color = c; }

Here is the caller graph for this function:


Member Data Documentation

Definition at line 36 of file ColoredObject.h.

Referenced by cloneDeepInto(), get_fill_color(), has_fill_color(), and set_fill_color().

Definition at line 37 of file ColoredObject.h.

Referenced by cloneDeepInto(), get_frame_color(), has_frame_color(), and set_frame_color().


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