|
degate 0.1.1
|
Represents a placeable object. More...
#include <PlacedLogicModelObject.h>

Public Types | |
| enum | HIGHLIGHTING_STATE { HLIGHTSTATE_NOT = 0, HLIGHTSTATE_DIRECT = 1, HLIGHTSTATE_ADJACENT = 2 } |
Public Member Functions | |
| PlacedLogicModelObject () | |
| The constructor. | |
| virtual | ~PlacedLogicModelObject () |
| The destructor. | |
| virtual HIGHLIGHTING_STATE | get_highlighted () const |
| A placed object is highlightable. | |
| virtual bool | is_highlighted () const |
| Check if an object is highlighted at all. | |
| virtual void | set_highlighted (HIGHLIGHTING_STATE state) |
| Set the selection state. | |
| virtual void | set_layer (std::tr1::shared_ptr< Layer > layer) |
| Set the layer on which the object is placed. | |
| virtual std::tr1::shared_ptr < Layer > | get_layer () |
| Get the layer on which the object is placed. | |
| virtual void | print (std::ostream &os=std::cout, int n_tabs=0) const =0 |
| Print the object. | |
Protected Member Functions | |
| void | notify_shape_change () |
| Ajust the position in the quadtree. | |
Private Attributes | |
| HIGHLIGHTING_STATE | highlight_state |
| std::tr1::shared_ptr< Layer > | layer |
Represents a placeable object.
Any class that represents a somewhere placeable objects should inherit from that base class. The term "placed objects" is related to real existent physical structures on the chip surface (e.g. wire, vias, ...) as well as logical objects (e.g. annotations).
Definition at line 41 of file PlacedLogicModelObject.h.
Definition at line 47 of file PlacedLogicModelObject.h.
{
HLIGHTSTATE_NOT = 0,
HLIGHTSTATE_DIRECT = 1,
HLIGHTSTATE_ADJACENT = 2
};
| PlacedLogicModelObject::PlacedLogicModelObject | ( | ) |
The constructor.
Definition at line 31 of file PlacedLogicModelObject.cc.
: highlight_state(HLIGHTSTATE_NOT) { }
| PlacedLogicModelObject::~PlacedLogicModelObject | ( | ) | [virtual] |
| PlacedLogicModelObject::HIGHLIGHTING_STATE PlacedLogicModelObject::get_highlighted | ( | ) | const [virtual] |
A placed object is highlightable.
You can ask for its state with this method.
Definition at line 37 of file PlacedLogicModelObject.cc.
References highlight_state.
{
return highlight_state;
}
| std::tr1::shared_ptr< Layer > PlacedLogicModelObject::get_layer | ( | ) | [virtual] |
Get the layer on which the object is placed.
Definition at line 54 of file PlacedLogicModelObject.cc.
References layer.
Referenced by degate::Wire::push_object_to_server(), degate::Via::push_object_to_server(), and degate::EMarker::push_object_to_server().
{
return layer;
}

| bool PlacedLogicModelObject::is_highlighted | ( | ) | const [virtual] |
Check if an object is highlighted at all.
Definition at line 41 of file PlacedLogicModelObject.cc.
References highlight_state, and HLIGHTSTATE_NOT.
{
return highlight_state != PlacedLogicModelObject::HLIGHTSTATE_NOT;
}
| void PlacedLogicModelObject::notify_shape_change | ( | ) | [protected] |
Ajust the position in the quadtree.
Definition at line 58 of file PlacedLogicModelObject.cc.
References degate::LogicModelObjectBase::get_object_id(), degate::LogicModelObjectBase::has_valid_object_id(), and layer.
Referenced by degate::Via::set_diameter(), degate::GatePort::set_diameter(), degate::EMarker::set_diameter(), degate::Via::set_x(), degate::GatePort::set_x(), degate::EMarker::set_x(), degate::Via::set_y(), degate::GatePort::set_y(), degate::EMarker::set_y(), degate::Wire::shift_x(), degate::Via::shift_x(), degate::GatePort::shift_x(), degate::EMarker::shift_x(), degate::Annotation::shift_x(), degate::Wire::shift_y(), degate::Via::shift_y(), degate::GatePort::shift_y(), degate::EMarker::shift_y(), and degate::Annotation::shift_y().
{
if(layer != NULL && has_valid_object_id()) {
layer->notify_shape_change(get_object_id());
}
}


| virtual void degate::PlacedLogicModelObject::print | ( | std::ostream & | os = std::cout, |
| int | n_tabs = 0 |
||
| ) | const [pure virtual] |
Print the object.
Implemented in degate::Annotation, degate::EMarker, degate::Gate, degate::GatePort, degate::Via, and degate::Wire.
| void PlacedLogicModelObject::set_highlighted | ( | PlacedLogicModelObject::HIGHLIGHTING_STATE | state | ) | [virtual] |
Set the selection state.
Definition at line 45 of file PlacedLogicModelObject.cc.
References highlight_state.
{
highlight_state = state;
}
| void PlacedLogicModelObject::set_layer | ( | std::tr1::shared_ptr< Layer > | layer | ) | [virtual] |
Set the layer on which the object is placed.
Definition at line 50 of file PlacedLogicModelObject.cc.
References layer.
Definition at line 55 of file PlacedLogicModelObject.h.
Referenced by get_highlighted(), is_highlighted(), and set_highlighted().
std::tr1::shared_ptr<Layer> degate::PlacedLogicModelObject::layer [private] |
Definition at line 56 of file PlacedLogicModelObject.h.
Referenced by get_layer(), notify_shape_change(), degate::Wire::push_object_to_server(), degate::Via::push_object_to_server(), degate::EMarker::push_object_to_server(), and set_layer().
1.7.4