MyCaffe  1.11.8.27
Deep learning software for Windows C# programmers.
EventArgs.cs
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5
9
10namespace MyCaffe.basecode
11{
15 public class LogProgressArg : EventArgs
16 {
17 string m_strSrc;
18 double m_dfProgress = 0;
19
25 public LogProgressArg(string strSrc, double dfProgress)
26 {
27 m_strSrc = strSrc;
28 m_dfProgress = dfProgress;
29 }
30
34 public string Source
35 {
36 get { return m_strSrc; }
37 }
38
42 public double Progress
43 {
44 get { return m_dfProgress; }
45 }
46 }
47
51 public class LogArg : LogProgressArg
52 {
53 string m_strMsg;
54 object m_tag = null;
55 bool m_bError;
56 bool m_bOverrideEnabled = false;
57 bool m_bConsumed = false;
58 bool m_bDisable = false;
59
69 public LogArg(string strSrc, string strMsg, double dfProgress = 0.0, bool bError = false, bool bOverrideEnabled = false, bool bDisable = false)
70 : base(strSrc, dfProgress)
71 {
72 m_strMsg = strMsg;
73 m_bError = bError;
74 m_bOverrideEnabled = bOverrideEnabled;
75 m_bDisable = bDisable;
76 }
77
81 public bool Consumed
82 {
83 get { return m_bConsumed; }
84 set { m_bConsumed = value; }
85 }
86
90 public bool Disable
91 {
92 get { return m_bDisable; }
93 set { m_bDisable = value; }
94 }
95
99 public string Message
100 {
101 get { return m_strMsg; }
102 }
103
107 public bool Error
108 {
109 get { return m_bError; }
110 }
111
115 public bool OverrideEnabled
116 {
117 get { return m_bOverrideEnabled; }
118 }
119
120#pragma warning disable 1591
121
122 public object Tag
123 {
124 get { return m_tag; }
125 set { m_tag = value; }
126 }
127
128#pragma warning restore 1591
129 }
130
134 public class CalculateImageMeanArgs : EventArgs
135 {
136 SimpleDatum[] m_rgImg;
137 SimpleDatum m_mean;
138 bool m_bCancelled = false;
139
145 {
146 m_rgImg = rgImg;
147 }
148
153 {
154 get { return m_rgImg; }
155 }
156
161 {
162 get { return m_mean; }
163 set { m_mean = value; }
164 }
165
169 public bool Cancelled
170 {
171 get { return m_bCancelled; }
172 set { m_bCancelled = value; }
173 }
174 }
175
179 public class OverrideProjectArgs : EventArgs
180 {
181 RawProto m_proto;
182
188 {
189 m_proto = proto;
190 }
191
196 {
197 get { return m_proto; }
198 set { m_proto = value; }
199 }
200 }
201}
The CalculateImageMeanArgs is passed as an argument to the MyCaffeImageDatabase::OnCalculateImageMean...
Definition: EventArgs.cs:135
SimpleDatum ImageMean
Get/set the image mean calculated from the Images.
Definition: EventArgs.cs:161
CalculateImageMeanArgs(SimpleDatum[] rgImg)
The CalculateImageMeanArgs constructor.
Definition: EventArgs.cs:144
SimpleDatum[] Images
Specifies the list of images from which the mean should be calculated.
Definition: EventArgs.cs:153
bool Cancelled
Get/set a flag indicating to cancel the operation.
Definition: EventArgs.cs:170
The LogArg is passed as an argument to the Log::OnWriteLine event.
Definition: EventArgs.cs:52
bool Consumed
Specifies whether or not the message has already been consumed.
Definition: EventArgs.cs:82
bool OverrideEnabled
Returns whether or not the override was enabled or not.
Definition: EventArgs.cs:116
bool Error
Returns whether or not this is an error message.
Definition: EventArgs.cs:108
string Message
Returns the message logged.
Definition: EventArgs.cs:100
bool Disable
Specifies whether or not to mark this log entry as disabled so that it is not output.
Definition: EventArgs.cs:91
LogArg(string strSrc, string strMsg, double dfProgress=0.0, bool bError=false, bool bOverrideEnabled=false, bool bDisable=false)
The LogArg constructor.
Definition: EventArgs.cs:69
The LogProgressArg is passed as an argument to the Log::OnProgress event.
Definition: EventArgs.cs:16
LogProgressArg(string strSrc, double dfProgress)
The LogProgressArg constructor.
Definition: EventArgs.cs:25
double Progress
Returns the progress value.
Definition: EventArgs.cs:43
string Source
Returns the Log source name.
Definition: EventArgs.cs:35
The OverrideProjectArgs is passed as an argument to the OnOverrideModel and OnOverrideSolver events f...
Definition: EventArgs.cs:180
RawProto Proto
Get/set the RawProto used.
Definition: EventArgs.cs:196
OverrideProjectArgs(RawProto proto)
The OverrideProjectArgs constructor.
Definition: EventArgs.cs:187
The RawProto class is used to parse and output Google prototxt file data.
Definition: RawProto.cs:17
The SimpleDatum class holds a data input within host memory.
Definition: SimpleDatum.cs:19
The MyCaffe.basecode contains all generic types used throughout MyCaffe.
Definition: Annotation.cs:12