|
degate 0.1.1
|
00001 /* -*-c++-*- 00002 00003 This file is part of the IC reverse engineering tool degate. 00004 00005 Copyright 2008, 2009, 2010 by Martin Schobert 00006 00007 Degate is free software: you can redistribute it and/or modify 00008 it under the terms of the GNU General Public License as published by 00009 the Free Software Foundation, either version 3 of the License, or 00010 any later version. 00011 00012 Degate is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 GNU General Public License for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with degate. If not, see <http://www.gnu.org/licenses/>. 00019 00020 */ 00021 00022 #include "globals.h" 00023 #include "LogicModelObjectBase.h" 00024 #include "Net.h" 00025 #include "Layer.h" 00026 #include "LogicModel.h" 00027 #include "PlacedLogicModelObject.h" 00028 00029 using namespace degate; 00030 00031 PlacedLogicModelObject::PlacedLogicModelObject() : highlight_state(HLIGHTSTATE_NOT) { 00032 } 00033 00034 PlacedLogicModelObject::~PlacedLogicModelObject() { 00035 } 00036 00037 PlacedLogicModelObject::HIGHLIGHTING_STATE PlacedLogicModelObject::get_highlighted() const { 00038 return highlight_state; 00039 } 00040 00041 bool PlacedLogicModelObject::is_highlighted() const { 00042 return highlight_state != PlacedLogicModelObject::HLIGHTSTATE_NOT; 00043 } 00044 00045 void PlacedLogicModelObject::set_highlighted(PlacedLogicModelObject::HIGHLIGHTING_STATE state) { 00046 highlight_state = state; 00047 } 00048 00049 00050 void PlacedLogicModelObject::set_layer(std::tr1::shared_ptr<Layer> layer) { 00051 this->layer = layer; 00052 } 00053 00054 std::tr1::shared_ptr<Layer> PlacedLogicModelObject::get_layer() { 00055 return layer; 00056 } 00057 00058 void PlacedLogicModelObject::notify_shape_change() { 00059 00060 if(layer != NULL && has_valid_object_id()) { 00061 layer->notify_shape_change(get_object_id()); 00062 } 00063 }
1.7.4