33#include "hurricane/Component.h"
34#include "hurricane/Contacts.h"
43 class Contact :
public Component {
45 static FastRTTI _fastRTTI;
47 static inline const FastRTTI& fastRTTI ();
48 virtual const FastRTTI& vfastRTTI ()
const;
51 const uint64_t NoFlags = 0;
52 const uint64_t RotateTopMetal = (1 << 0);
53 const uint64_t RotateBottomMetal = (1 << 1);
54 const uint64_t AllRotate = RotateTopMetal|RotateBottomMetal;
56 class AnchorHook :
public Hook {
61 AnchorHook ( Contact* );
63 virtual Component* getComponent ()
const;
64 virtual bool isMaster ()
const {
return false; };
65 virtual std::string _getTypeName ()
const {
return "Contact::AnchorHook"; };
66 virtual std::string _getString ()
const;
67 static Hook* _compToHook ( Component* );
87 static inline void enableCheckMinSize ();
88 static inline void disableCheckMinSize ();
96 static Contact*
create ( Component* anchor
104 inline bool isRotatedTopMetal ()
const;
105 inline bool isRotatedBottomMetal ()
const;
106 virtual Hooks getHooks ()
const;
109 virtual Point getPosition ()
const;
110 virtual Box getBoundingBox ()
const;
111 virtual const Layer* getLayer ()
const {
return _layer;};
134 inline void setRotatedTopMetal (
bool state );
135 inline void setRotatedBottomMetal (
bool state );
139 virtual void _preDestroy ();
141 virtual void _toJson ( JsonWriter* )
const;
142 virtual std::string _getTypeName ()
const {
return _TName(
"Contact"); };
143 virtual std::string _getString ()
const;
144 virtual Record* _getRecord ()
const;
146 static bool _checkMinSize;
147 AnchorHook _anchorHook;
158 inline const FastRTTI& Contact::fastRTTI () {
return _fastRTTI; }
160 inline void Contact::enableCheckMinSize () { _checkMinSize=
true; }
161 inline void Contact::disableCheckMinSize () { _checkMinSize=
false; }
162 inline bool Contact::isRotatedTopMetal ()
const {
return _flags & RotateTopMetal; }
163 inline bool Contact::isRotatedBottomMetal ()
const {
return _flags & RotateBottomMetal; }
165 inline void Contact::setRotatedTopMetal (
bool state )
166 {
if (state) _flags |= RotateTopMetal;
else _flags &= ~RotateTopMetal; }
168 inline void Contact::setRotatedBottomMetal (
bool state )
169 {
if (state) _flags |= RotateBottomMetal;
else _flags &= ~RotateBottomMetal; }
175 class JsonContact :
public JsonComponent {
177 static void initialize ();
178 JsonContact (
unsigned long flags );
179 virtual std::string getTypeName ()
const;
180 virtual JsonContact* clone (
unsigned long )
const;
181 virtual void toData ( JsonStack& );
BasicLayer description (API)
Definition BasicLayer.h:42
Box description (API)
Definition Box.h:30
std::int64_t Unit
Definition DbU.h:67
Hook description (API)
Definition Hook.h:34
Layer description (API)
Definition Layer.h:120
Net description (API)
Definition Net.h:46
Point description (API)
Definition Point.h:30
Contains Almost Everything.
Definition BasicLayer.h:39
GenericCollection< Hook * > Hooks
Definition Hooks.h:35