PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
vtkPlusDeviceFactory Class Reference

Factory class of supported devices. More...

#include <src/PlusDataCollection/vtkPlusDeviceFactory.h>

Inheritance diagram for vtkPlusDeviceFactory:
Inheritance graph
[legend]
Collaboration diagram for vtkPlusDeviceFactory:
Collaboration graph
[legend]

Public Types

typedef vtkPlusDevice *(* PointerToDevice) ()
 
typedef vtkObject Superclass
 

Public Member Functions

PlusStatus CreateInstance (const char *aDeviceType, vtkPlusDevice *&aDevice, const std::string &aDeviceId)
 
virtual const char * GetClassName ()
 
virtual PlusStatus GetDeviceClassName (const std::string &deviceTypeName, std::string &classNameOut) const
 
virtual PlusStatus GetDeviceTypeName (const std::string &deviceClassName, std::string &typeNameOut) const
 
virtual int IsA (const char *type)
 
virtual void PrintAvailableDevices (ostream &os, vtkIndent indent)
 
virtual void PrintSelf (ostream &os, vtkIndent indent) VTK_OVERRIDE
 
void RegisterDevice (const std::string &deviceTypeName, const std::string &deviceClassName, PointerToDevice constructionMethod)
 

Static Public Member Functions

static int IsTypeOf (const char *type)
 
static vtkPlusDeviceFactoryNew ()
 
static vtkPlusDeviceFactorySafeDownCast (vtkObject *o)
 

Protected Member Functions

 vtkPlusDeviceFactory (void)
 
virtual ~vtkPlusDeviceFactory (void)
 

Protected Attributes

std::map< std::string, std::string > DeviceTypeClassNames
 
std::map< std::string, PointerToDeviceDeviceTypes
 

Detailed Description

Factory class of supported devices.

This class is a factory class of supported trackers and video sources to localize the object creation code.

Definition at line 27 of file vtkPlusDeviceFactory.h.

Member Typedef Documentation

◆ PointerToDevice

typedef vtkPlusDevice*(* vtkPlusDeviceFactory::PointerToDevice) ()

Function pointer for storing New() static methods of vtkPlusDevice classes

Definition at line 31 of file vtkPlusDeviceFactory.h.

◆ Superclass

Definition at line 35 of file vtkPlusDeviceFactory.h.

Constructor & Destructor Documentation

◆ vtkPlusDeviceFactory()

vtkPlusDeviceFactory::vtkPlusDeviceFactory ( void  )
protected

Definition at line 258 of file vtkPlusDeviceFactory.cxx.

◆ ~vtkPlusDeviceFactory()

vtkPlusDeviceFactory::~vtkPlusDeviceFactory ( void  )
protectedvirtual

Definition at line 482 of file vtkPlusDeviceFactory.cxx.

Member Function Documentation

◆ CreateInstance()

PlusStatus vtkPlusDeviceFactory::CreateInstance ( const char *  aDeviceType,
vtkPlusDevice *&  aDevice,
const std::string &  aDeviceId 
)

Create a new device instance from device type, delete previous device if's not NULL

Definition at line 511 of file vtkPlusDeviceFactory.cxx.

◆ GetClassName()

virtual const char* vtkPlusDeviceFactory::GetClassName ( )
virtual

◆ GetDeviceClassName()

PlusStatus vtkPlusDeviceFactory::GetDeviceClassName ( const std::string &  deviceTypeName,
std::string &  classNameOut 
) const
virtual

Retrieve a C++ class name given a factory name

Definition at line 567 of file vtkPlusDeviceFactory.cxx.

◆ GetDeviceTypeName()

PlusStatus vtkPlusDeviceFactory::GetDeviceTypeName ( const std::string &  deviceClassName,
std::string &  typeNameOut 
) const
virtual

Retrieve a factory device type given a C++ class name

Definition at line 580 of file vtkPlusDeviceFactory.cxx.

◆ IsA()

virtual int vtkPlusDeviceFactory::IsA ( const char *  type)
virtual

◆ IsTypeOf()

static int vtkPlusDeviceFactory::IsTypeOf ( const char *  type)
static

◆ New()

static vtkPlusDeviceFactory* vtkPlusDeviceFactory::New ( )
static

◆ PrintAvailableDevices()

void vtkPlusDeviceFactory::PrintAvailableDevices ( ostream &  os,
vtkIndent  indent 
)
virtual

Print all supported devices with SDK version number

Definition at line 494 of file vtkPlusDeviceFactory.cxx.

◆ PrintSelf()

void vtkPlusDeviceFactory::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
virtual

Definition at line 487 of file vtkPlusDeviceFactory.cxx.

◆ RegisterDevice()

void vtkPlusDeviceFactory::RegisterDevice ( const std::string &  deviceTypeName,
const std::string &  deviceClassName,
vtkPlusDeviceFactory::PointerToDevice  constructionMethod 
)

Registration function to add new devices to the factory

Definition at line 595 of file vtkPlusDeviceFactory.cxx.

◆ SafeDownCast()

static vtkPlusDeviceFactory* vtkPlusDeviceFactory::SafeDownCast ( vtkObject *  o)
static

Member Data Documentation

◆ DeviceTypeClassNames

std::map<std::string, std::string> vtkPlusDeviceFactory::DeviceTypeClassNames
protected

Lookup map to translate factory names to C++ class names

Definition at line 60 of file vtkPlusDeviceFactory.h.

◆ DeviceTypes

std::map<std::string, PointerToDevice> vtkPlusDeviceFactory::DeviceTypes
protected

Map tracker types and the New() static methods of vtkPlusDevice classes

Definition at line 58 of file vtkPlusDeviceFactory.h.


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