degate 0.1.1
EMarker.h
Go to the documentation of this file.
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 #ifndef __EMARKER_H__
00023 #define __EMARKER_H__
00024 
00025 #include "globals.h"
00026 #include "LogicModelObjectBase.h"
00027 #include "Net.h"
00028 #include "Layer.h"
00029 #include "LogicModel.h"
00030 #include "ConnectedLogicModelObject.h"
00031 #include "degate_exceptions.h"
00032 #include "Circle.h"
00033 #include <RemoteObject.h>
00034 
00035 #include <tr1/memory>
00036 
00037 namespace degate {
00038 
00039   /**
00040    * Representation of an electrically connectable marker object.
00041    */
00042   class EMarker : public Circle, public ConnectedLogicModelObject, public RemoteObject {
00043 
00044 
00045   public:
00046 
00047     /**
00048      * Constructor for a via object.
00049      */
00050 
00051     EMarker(int _x, int _y, diameter_t _diameter = 5);
00052 
00053     /**
00054      * Destructor for a via object.
00055      */
00056 
00057     virtual ~EMarker();
00058 
00059     /**
00060      * Get a human readable string that describes the whole
00061      * logic model object. The string should be unique in order
00062      * to let the user identify the concrete object. But that
00063      * is not a must.
00064      */
00065 
00066     virtual const std::string get_descriptive_identifier() const;
00067 
00068     /**
00069      * Get a human readable string that names the object type.
00070      * Here it is "EMarker".
00071      */
00072 
00073     virtual const std::string get_object_type_name() const;
00074 
00075     /**
00076      * Print the object.
00077      */
00078 
00079     void print(std::ostream & os, int n_tabs) const;
00080 
00081 
00082     void shift_x(int delta_x);
00083     void shift_y(int delta_y);
00084     void set_x(int x);
00085     void set_y(int y);
00086     void set_diameter(unsigned int diameter);
00087 
00088     virtual bool in_bounding_box(BoundingBox const& bbox) const {
00089       return Circle::in_bounding_box(bbox);
00090     }
00091 
00092     virtual BoundingBox const& get_bounding_box() const {
00093       return Circle::get_bounding_box();
00094     }
00095 
00096     virtual bool in_shape(int x, int y, int max_distance = 0) const {
00097       return Circle::in_shape(x, y, max_distance);
00098     }
00099 
00100   protected:
00101 
00102     virtual object_id_t push_object_to_server(std::string const& server_url);
00103 
00104   };
00105 
00106 
00107 }
00108 
00109 #endif