AJA NTV2 SDK  17.0.1.1246
NTV2 SDK 17.0.1.1246
masterport.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: MIT */
8 #if !defined (__MASTERPORT_H__)
9  #define __MASTERPORT_H__
10 
11  // Includes
13  #include <IOKit/IOKitLib.h>
14  #include <assert.h>
15 
16 
20  class MasterPort;
22 
23  class MasterPort
24  {
25  // Class Methods
26  public:
27  static IONotificationPortRef Get (void);
28  static MasterPortPtr GetInstance (void);
29  private:
30  static bool Create (MasterPortPtr & outObj);
31 
32  // Instance Methods
33  public:
34  virtual ~MasterPort ();
35  virtual inline IONotificationPortRef GetPortRef (void) const {return mpMasterPort;}
36  virtual inline operator IONotificationPortRef () const {return GetPortRef ();}
37  virtual inline bool IsOkay (void) const {return GetPortRef () ? true : false;}
38 
39  private:
40  explicit MasterPort ();
41  inline MasterPort (const MasterPort & inObj) {if (&inObj != this) assert (false);}
42  inline MasterPort & operator = (const MasterPort & inRHS) {if (&inRHS != this) assert (false); return *this;}
43 
44  // Instance Data
45  private:
46  IONotificationPortRef mpMasterPort;
47 
48  }; // MasterPort
49 
50 #endif // __MASTERPORT_H__
MasterPort::GetInstance
static MasterPortPtr GetInstance(void)
Definition: masterport.cpp:43
AJARefPtr
I am a reference-counted pointer template class. I am intended to be a proxy for an underlying object...
Definition: ajarefptr.h:89
MasterPort::~MasterPort
virtual ~MasterPort()
Definition: masterport.cpp:94
MasterPort::Get
static IONotificationPortRef Get(void)
Definition: masterport.cpp:26
MasterPort::GetPortRef
virtual IONotificationPortRef GetPortRef(void) const
Definition: masterport.h:35
MasterPort
Definition: masterport.h:23
MasterPort::IsOkay
virtual bool IsOkay(void) const
Definition: masterport.h:37
true
#define true
Definition: ntv2devicefeatures.h:26
MasterPortPtr
AJARefPtr< MasterPort > MasterPortPtr
Definition: masterport.h:20
ajarefptr.h
Defines the AJARefPtr template class.