CodeVis.com SourceForge.net Logo

CVPlatform Class Reference

#include <CVPlatform.h>

List of all members.


Detailed Description

Platform-specific object factory

CVPlatform is a singleton class factory for platform-specific classes. This allows us to instantiate totally different objects on different platforms without making the calling code platform-specific or requiring subclassing.

When setting up a project for a specific platform, make sure to add in the appropriate CVPlatform*.cpp for that platform. It implements the CVPlatform class for us. Also make sure to include the platform-specific .cpp file for each class we use CVPlatform to create.

RCSfile
CVPlatform.h,v
Date
2004/02/08 23:47:39
Revision
1.1.1.1
Author
mikeellison

Definition at line 63 of file CVPlatform.h.

Public Member Functions

Static Public Member Functions

Protected Member Functions

Static Private Member Functions

Static Private Attributes


Constructor & Destructor Documentation

CVPlatform::CVPlatform  )  [protected]
 

CVPlatform constructor - use GetPlatform() instead.

GetPlatform() creates the platform object if needed.

Definition at line 124 of file CVPlatformWin32.cpp.

Referenced by GetPlatform().

CVPlatform::~CVPlatform  )  [protected, virtual]
 

CVPlatform destructor - don't delete CVPlatform directly.

GetPlatform() registers with the runtime library for deletion when the process exits.

Definition at line 134 of file CVPlatformWin32.cpp.


Member Function Documentation

CVVidCapture * CVPlatform::AcquireVideoCapture  ) 
 

AcquireVideoCapture() acquires a CVVidCapture object appropriate for the current system.

Definition at line 96 of file CVPlatformWin32.cpp.

Referenced by CVAcquireVidCap(), CVidCapGuiTestDlg::OnInitDialog(), and TestIt().

void CVPlatform::FreePlatform  )  [static, private]
 

FreePlatform() frees the static platform object as the process exits.

Do not call it directly. It is made to be called from the atexit() handler.

Definition at line 146 of file CVPlatformWin32.cpp.

References sPlatform.

Referenced by GetPlatform().

CVPlatform * CVPlatform::GetPlatform  )  [static]
 

GetPlatform() retrieves a pointer to the singleton platform object.

Only one instance will be created on the first call. It is automatically freed on exit from the process.

Returns:
CVPlatform* - pointer to CVPlatform object

Definition at line 73 of file CVPlatformWin32.cpp.

References CVPlatform(), FreePlatform(), and sPlatform.

Referenced by CVAcquireVidCap(), CVReleaseVidCap(), CVidCapGuiTestDlg::OnDestroy(), CVidCapGuiTestDlg::OnInitDialog(), and TestIt().

void CVPlatform::Release CVVidCapture *&  vidCap  ) 
 

Release() releases an object and sets the pointer to NULL.

This version is for video capture objects.

Parameters:
vidCap - a CVVidCapture* previously allocated by AcquireVideoCapture().
See also:
CVVidCapture, CVVidCaptureDSWin32

Definition at line 110 of file CVPlatformWin32.cpp.

Referenced by CVAcquireVidCap(), CVReleaseVidCap(), CVidCapGuiTestDlg::OnDestroy(), CVidCapGuiTestDlg::OnInitDialog(), and TestIt().


Member Data Documentation

CVPlatform * CVPlatform::sPlatform = 0 [static, private]
 

Our static platform pointer.

Definition at line 63 of file CVPlatformWin32.cpp.

Referenced by FreePlatform(), and GetPlatform().


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

Generated on Mon Mar 1 13:27:14 2004 for VidCapture Library by doxygen 1.3.3
CodeVis VidCapture 0.2 Copyright © 2003-2004 by Michael Ellison.