Quantum Fog  0.9.3
DET_ND.h
1 #pragma once
2 #include "QFog_constants.h"
3 #include "VECTOR.h"
4 #include "NODE.h"
5 
6 //det = deterministic
7 
8 #ifdef _mac_gui_app //''''''''''''''''''''''''''''''''''''''''''''\\.
9  class QB_NET;
10  class C_PI_WIND;
11  class C_DET_ND_AMP_GEN;
12 
13  enum DET_ND_TYPE {k_cnot=1, k_marg, k_pshifter};
14 #endif //_mac_gui_app \\............................................//
15 
16 
17 //******************************************
18 class DET_ND : public NODE
19 {
20 private:
21 public:
22 
23  DET_ND();
24  virtual ~DET_ND();
25 
26 #ifdef _mac_gui_app //''''''''''''''''''''''''''''''''''''''''''''\\.
27 
28 private:
29  // The node has one s/d port that can carry unlimited s and d loads.
30  // loc = the center of the icon,
31  // greeting_rad = sel_rad
32  // docking_rad = mask_rad
33  enum {sel_rad=8, mask_rad=6};
34  RGBColor its_color;
35 public:
36  DET_ND( const Point & m_down_pt);
37 
38  STRINGY get_class_str();
39  ND_CLASS_ID get_class_id();
40 
41  virtual VOID set_st_names_to_default();
42 
43  virtual USHORT get_sel_rad() const;
44  virtual USHORT get_mask_rad() const;
45 
46  const RGBColor & get_color() const;
47  BOOLEAN has_color();
48  VOID set_color(const RGBColor & color);
49 
50  VOID draw();
51  VOID undraw();
52 
53  VOID call_amp_gen(QB_NET * net_p, C_PI_WIND * pi_wind_p);
54 
55 
56 #endif //_mac_gui_app \\............................................//
57 
58 
59 };
60 #pragma mark -
61 
62 
63 #ifdef _mac_gui_app //''''''''''''''''''''''''''''''''''''''''''''\\.
64 
65 //******************************************
66 inline
67 STRINGY DET_ND::get_class_str()
68 {
69  return "DET_ND";
70 }
71 //******************************************
72 inline
73 ND_CLASS_ID DET_ND::get_class_id()
74 {
75  return DET_ND_id;
76 }
77 //******************************************
78 inline
79 VOID DET_ND::set_st_names_to_default()
80 {
81  set_st_names_to_monotone_seq(0);
82 }
83 //******************************************
84 inline
85 USHORT DET_ND::get_sel_rad() const
86 {
87  return sel_rad;
88 }
89 //******************************************
90 inline
91 USHORT DET_ND::get_mask_rad() const
92 {
93  return mask_rad;
94 }
95 //******************************************
96 inline
97 const RGBColor & DET_ND::get_color() const
98 {
99  return its_color;
100 }
101 //******************************************
102 inline
103 BOOLEAN DET_ND::has_color()
104 {
105  return true;
106 }
107 //******************************************
108 inline
109 VOID DET_ND::set_color(
110 const RGBColor & color) //in
111 {
112  its_color = color;
113 }
114 //******************************************
115 inline
116 VOID DET_ND::undraw()
117 {
118  NODE::undraw(mask_rad);
119 }
120 #endif //_mac_gui_app \\............................................//
121 
122 
Definition: STRINGY.h:22
Definition: DET_ND.h:18
Definition: QB_NET.h:34
Definition: NODE.h:52
Definition: C_PI_WIND.h:18
Definition: C_DET_ND_AMP_GEN.h:30