MyCaffe  1.12.2.41
Deep learning software for Windows C# programmers.
MyCaffe.basecode.CancelEvent Class Reference

The CancelEvent provides an extension to the manual cancel event that allows for overriding the manual cancel event. More...

Inheritance diagram for MyCaffe.basecode.CancelEvent:

Public Member Functions

 CancelEvent ()
 The CancelEvent constructor. More...
 
 CancelEvent (string strGlobalName)
 The CancelEvent constructor that accepts a global name. More...
 
 CancelEvent (CancelEvent evtCancel)
 Create a new Cancel Event and add another to this ones overrides. More...
 
void AddCancelOverride (string strName)
 Add a new cancel override. More...
 
void AddCancelOverride (CancelEvent evtCancel)
 Add a new cancel override. More...
 
void AddCancelOverride (WaitHandle evtCancel)
 Add a new cancel override. More...
 
bool Contains (CancelEvent evt)
 Check to see if the cancel event has already been added. More...
 
bool Contains (WaitHandle evt)
 Check to see if the cancel event has already been added. More...
 
bool Contains (string strName)
 Check to see if the named cancel event has already been added. More...
 
bool RemoveCancelOverride (string strName)
 Remove a new cancel override. More...
 
bool RemoveCancelOverride (CancelEvent evtCancel)
 Remove a new cancel override. More...
 
bool RemoveCancelOverride (WaitHandle evtCancel)
 Remove a new cancel override. More...
 
void Set ()
 Sets the event to the signaled state. More...
 
void Reset ()
 Resets the event clearing any signaled state. More...
 
bool WaitOne (int nMs=int.MaxValue)
 Waits for the signal state to occur. More...
 
void Dispose ()
 Releases all resources used by the CancelEvent. More...
 

Protected Member Functions

virtual void Dispose (bool disposing)
 Releases all resources used by the CancelEvent. More...
 

Properties

string Name [get]
 Return the name of the cancel event. More...
 
WaitHandle[] Handles [get]
 Returns the internal wait handle of the CancelEvent. More...
 

Detailed Description

The CancelEvent provides an extension to the manual cancel event that allows for overriding the manual cancel event.

The CancelEvent is used by the CaffeControl to cancel training and testing operations.

Definition at line 16 of file CancelEvent.cs.

Constructor & Destructor Documentation

◆ CancelEvent() [1/3]

MyCaffe.basecode.CancelEvent.CancelEvent ( )

The CancelEvent constructor.

Definition at line 28 of file CancelEvent.cs.

◆ CancelEvent() [2/3]

MyCaffe.basecode.CancelEvent.CancelEvent ( string  strGlobalName)

The CancelEvent constructor that accepts a global name.

Parameters
strGlobalNameSpecifies the global name. If this parameter is null, the constructor acts like the default constructor.

Definition at line 39 of file CancelEvent.cs.

◆ CancelEvent() [3/3]

MyCaffe.basecode.CancelEvent.CancelEvent ( CancelEvent  evtCancel)

Create a new Cancel Event and add another to this ones overrides.

Parameters
evtCancelSpecifies the Cancel Event to add to the overrides.

Definition at line 58 of file CancelEvent.cs.

Member Function Documentation

◆ AddCancelOverride() [1/3]

void MyCaffe.basecode.CancelEvent.AddCancelOverride ( CancelEvent  evtCancel)

Add a new cancel override.

Parameters
evtCancelSpecifies the cancel override to add.

Definition at line 98 of file CancelEvent.cs.

◆ AddCancelOverride() [2/3]

void MyCaffe.basecode.CancelEvent.AddCancelOverride ( string  strName)

Add a new cancel override.

Parameters
strNameSpecifies the name of the cancel event to add.

Definition at line 83 of file CancelEvent.cs.

◆ AddCancelOverride() [3/3]

void MyCaffe.basecode.CancelEvent.AddCancelOverride ( WaitHandle  evtCancel)

Add a new cancel override.

Parameters
evtCancelSpecifies the cancel wait handle to add.

Definition at line 111 of file CancelEvent.cs.

◆ Contains() [1/3]

bool MyCaffe.basecode.CancelEvent.Contains ( CancelEvent  evt)

Check to see if the cancel event has already been added.

Parameters
evtSpecifies the cancel event to look for.
Returns
Returns true if the cancel event has already been added, false otherwise.

Definition at line 125 of file CancelEvent.cs.

◆ Contains() [2/3]

bool MyCaffe.basecode.CancelEvent.Contains ( string  strName)

Check to see if the named cancel event has already been added.

Parameters
strNameSpecifies the name of the cancel event to look for.
Returns
Returns true if the cancel event has already been added, false otherwise.

Definition at line 151 of file CancelEvent.cs.

◆ Contains() [3/3]

bool MyCaffe.basecode.CancelEvent.Contains ( WaitHandle  evt)

Check to see if the cancel event has already been added.

Parameters
evtSpecifies the wait handle to look for.
Returns
Returns true if the cancel event has already been added, false otherwise.

Definition at line 135 of file CancelEvent.cs.

◆ Dispose() [1/2]

void MyCaffe.basecode.CancelEvent.Dispose ( )

Releases all resources used by the CancelEvent.

Definition at line 339 of file CancelEvent.cs.

◆ Dispose() [2/2]

virtual void MyCaffe.basecode.CancelEvent.Dispose ( bool  disposing)
protectedvirtual

Releases all resources used by the CancelEvent.

Parameters
disposingSpecifies whether or not this was called from Dispose().

Definition at line 318 of file CancelEvent.cs.

◆ RemoveCancelOverride() [1/3]

bool MyCaffe.basecode.CancelEvent.RemoveCancelOverride ( CancelEvent  evtCancel)

Remove a new cancel override.

Parameters
evtCancelSpecifies the cancel override to remove.
Returns
If removed, true is returned.

Definition at line 200 of file CancelEvent.cs.

◆ RemoveCancelOverride() [2/3]

bool MyCaffe.basecode.CancelEvent.RemoveCancelOverride ( string  strName)

Remove a new cancel override.

Parameters
strNameSpecifies the name of the cancel event to remove.
Returns
If removed, true is returned.

Definition at line 167 of file CancelEvent.cs.

◆ RemoveCancelOverride() [3/3]

bool MyCaffe.basecode.CancelEvent.RemoveCancelOverride ( WaitHandle  evtCancel)

Remove a new cancel override.

Parameters
evtCancelSpecifies the wait handle override to remove.
Returns
If removed, true is returned.

Definition at line 233 of file CancelEvent.cs.

◆ Reset()

void MyCaffe.basecode.CancelEvent.Reset ( )

Resets the event clearing any signaled state.

Definition at line 279 of file CancelEvent.cs.

◆ Set()

void MyCaffe.basecode.CancelEvent.Set ( )

Sets the event to the signaled state.

Definition at line 270 of file CancelEvent.cs.

◆ WaitOne()

bool MyCaffe.basecode.CancelEvent.WaitOne ( int  nMs = int.MaxValue)

Waits for the signal state to occur.

Parameters
nMsSpecifies the number of milliseconds to wait.
Returns
If the CancelEvent is in the signal state, true is returned, otherwise false is returned.

Definition at line 290 of file CancelEvent.cs.

Property Documentation

◆ Handles

WaitHandle [] MyCaffe.basecode.CancelEvent.Handles
get

Returns the internal wait handle of the CancelEvent.

Definition at line 301 of file CancelEvent.cs.

◆ Name

string MyCaffe.basecode.CancelEvent.Name
get

Return the name of the cancel event.

Definition at line 262 of file CancelEvent.cs.


The documentation for this class was generated from the following file: