degate  0.1.2
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  Copyright 2012 Robert Nitsch
00007 
00008  Degate is free software: you can redistribute it and/or modify
00009  it under the terms of the GNU General Public License as published by
00010  the Free Software Foundation, either version 3 of the License, or
00011  any later version.
00012 
00013  Degate is distributed in the hope that it will be useful,
00014  but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  GNU General Public License for more details.
00017 
00018  You should have received a copy of the GNU General Public License
00019  along with degate. If not, see <http://www.gnu.org/licenses/>.
00020 
00021 */
00022 
00023 #ifndef __EMARKER_H__
00024 #define __EMARKER_H__
00025 
00026 #include "globals.h"
00027 #include "LogicModelObjectBase.h"
00028 #include "Net.h"
00029 #include "Layer.h"
00030 #include "LogicModel.h"
00031 #include "ConnectedLogicModelObject.h"
00032 #include "degate_exceptions.h"
00033 #include "Circle.h"
00034 #include <RemoteObject.h>
00035 
00036 #include <memory>
00037 
00038 namespace degate {
00039 
00040   /**
00041    * Representation of an electrically connectable marker object.
00042    */
00043   class EMarker : public Circle, public ConnectedLogicModelObject, public RemoteObject {
00044 
00045 
00046   public:
00047 
00048     explicit EMarker() {};
00049     
00050     /**
00051      * Constructor for a via object.
00052      */
00053 
00054     EMarker(int _x, int _y, diameter_t _diameter = 5);
00055 
00056     /**
00057      * Destructor for a via object.
00058      */
00059 
00060     virtual ~EMarker();
00061 
00062     //@{
00063     DeepCopyable_shptr cloneShallow() const;
00064     void cloneDeepInto(DeepCopyable_shptr destination, oldnew_t *oldnew) const;
00065     //@}
00066 
00067     /**
00068      * Get a human readable string that describes the whole
00069      * logic model object. The string should be unique in order
00070      * to let the user identify the concrete object. But that
00071      * is not a must.
00072      */
00073 
00074     virtual const std::string get_descriptive_identifier() const;
00075 
00076     /**
00077      * Get a human readable string that names the object type.
00078      * Here it is "EMarker".
00079      */
00080 
00081     virtual const std::string get_object_type_name() const;
00082 
00083     /**
00084      * Print the object.
00085      */
00086 
00087     void print(std::ostream & os, int n_tabs) const;
00088 
00089 
00090     void shift_x(int delta_x);
00091     void shift_y(int delta_y);
00092     void set_x(int x);
00093     void set_y(int y);
00094     void set_diameter(unsigned int diameter);
00095 
00096     virtual bool in_bounding_box(BoundingBox const& bbox) const {
00097       return Circle::in_bounding_box(bbox);
00098     }
00099 
00100     virtual BoundingBox const& get_bounding_box() const {
00101       return Circle::get_bounding_box();
00102     }
00103 
00104     virtual bool in_shape(int x, int y, int max_distance = 0) const {
00105       return Circle::in_shape(x, y, max_distance);
00106     }
00107 
00108   protected:
00109 
00110     virtual object_id_t push_object_to_server(std::string const& server_url);
00111 
00112   };
00113 
00114 
00115 }
00116 
00117 #endif