C++/CLI Sample
Demonstrates how to create a C++/CLI library using the VideoXpert SDK
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events
CPPCli::Marker Class Reference

The Marker class represents the location of a resource on a drawing. More...

#include <Marker.h>

Public Member Functions

 Marker (VxSdk::IVxMarker *vxMarker)
 Constructor. More...
 
virtual ~Marker ()
 Destructor. More...
 
 !Marker ()
 Finaliser. More...
 
Results::Value DeleteAssociation ()
 Deletes the data source associated with this marker. More...
 
DataSourceGetAssociation ()
 Gets the data source associated with this marker. More...
 
Results::Value Refresh ()
 Refreshes this instances properties. More...
 
Results::Value SetAssociation (DataSource^ dataSource)
 Sets the data source associated with this marker. More...
 
Results::Value SetCoordinates (float x, float y)
 Sets the location of the marker on the associated drawing. More...
 

Package Functions

CPPCli::Drawing_GetDrawing ()
 

Package Attributes

VxSdk::IVxMarker_marker
 

Properties

float Direction [get, set]
 Gets or sets the angular coordinate indicating the direction, if any, that the marker is facing on a polar grid(e.g.: 0 (right), 90 (up), 180 (left), 270 (down)). More...
 
Drawing^  Drawing [get]
 Gets the drawing that this marker belongs to. More...
 
System::String^  Id [get]
 Gets the unique marker identifier. More...
 
System::String^  Name [get, set]
 Gets or sets the friendly name of the marker. More...
 
float X [get]
 Gets the X coordinate. More...
 
float Y [get]
 Gets the Y coordinate. More...
 

Detailed Description

The Marker class represents the location of a resource on a drawing.

Definition at line 15 of file Marker.h.

Constructor & Destructor Documentation

CPPCli::Marker::Marker ( VxSdk::IVxMarker vxMarker)

Constructor.

Parameters
vxMarkerThe vx Marker.

Definition at line 9 of file Marker.cpp.

9  {
10  _marker = vxMarker;
11 }
VxSdk::IVxMarker * _marker
Definition: Marker.h:131
virtual CPPCli::Marker::~Marker ( )
inlinevirtual

Destructor.

Definition at line 27 of file Marker.h.

27  {
28  this->!Marker();
29  }
Marker(VxSdk::IVxMarker *vxMarker)
Constructor.
Definition: Marker.cpp:9
CPPCli::Marker::!Marker ( )

Finaliser.

Definition at line 13 of file Marker.cpp.

13  {
14  _marker->Delete();
15  _marker = nullptr;
16 }
VxSdk::IVxMarker * _marker
Definition: Marker.h:131
virtual VxResult::Value Delete() const =0

Member Function Documentation

CPPCli::Drawing CPPCli::Marker::_GetDrawing ( )
package

Definition at line 49 of file Marker.cpp.

49  {
50  // Get the drawing
51  VxSdk::IVxDrawing* drawing = nullptr;
52  VxSdk::VxResult::Value result = _marker->GetDrawing(drawing);
53 
54  // Return the drawing if GetDrawing was successful
55  if (result == VxSdk::VxResult::kOK)
56  return gcnew CPPCli::Drawing(drawing);
57 
58  return nullptr;
59 }
VxSdk::IVxMarker * _marker
Definition: Marker.h:131
The Drawing class represents a diagrammatic representation of an area. A drawing may contain any numb...
Definition: Drawing.h:17
virtual VxResult::Value GetDrawing(IVxDrawing *&drawing) const =0
CPPCli::Results::Value CPPCli::Marker::DeleteAssociation ( )

Deletes the data source associated with this marker.

Returns
The Result of the request.

Definition at line 18 of file Marker.cpp.

18  {
20 }
VxSdk::IVxMarker * _marker
Definition: Marker.h:131
Value
Values that represent the result of calls to the VideoXpert system.
Definition: Utils.h:21
virtual VxResult::Value DeleteAssociation() const =0
CPPCli::DataSource CPPCli::Marker::GetAssociation ( )

Gets the data source associated with this marker.

Returns
The associated data source if present, otherwise nullptr.

Definition at line 22 of file Marker.cpp.

22  {
23  // Get the data source
24  VxSdk::IVxDataSource* dataSource = nullptr;
25  VxSdk::VxResult::Value result = _marker->GetAssociation(dataSource);
26 
27  // Return the data source if GetAssociation was successful
28  if (result == VxSdk::VxResult::kOK)
29  return gcnew CPPCli::DataSource(dataSource);
30 
31  return nullptr;
32 }
VxSdk::IVxMarker * _marker
Definition: Marker.h:131
The DataSource class represents a data producer in the system hosted by a device. Each DataSource pro...
Definition: DataSource.h:20
virtual VxResult::Value GetAssociation(IVxDataSource *&dataSource) const =0
CPPCli::Results::Value CPPCli::Marker::Refresh ( )

Refreshes this instances properties.

Returns
The Result of updating the properties.

Definition at line 34 of file Marker.cpp.

34  {
36 }
VxSdk::IVxMarker * _marker
Definition: Marker.h:131
Value
Values that represent the result of calls to the VideoXpert system.
Definition: Utils.h:21
virtual VxResult::Value Refresh()=0
CPPCli::Results::Value CPPCli::Marker::SetAssociation ( DataSource dataSource)

Sets the data source associated with this marker.

Parameters
dataSourceThe data source to associate with this marker.
Returns
The Result of setting the property.

Definition at line 38 of file Marker.cpp.

38  {
39  // Make the call to set the associated data source
40  VxSdk::VxResult::Value result = _marker->SetAssociation(*dataSource->_dataSource);
41  // Unless there was an issue associating the data source the result should be VxSdk::VxResult::kOK
42  return CPPCli::Results::Value(result);
43 }
VxSdk::IVxMarker * _marker
Definition: Marker.h:131
Value
Values that represent the result of calls to the VideoXpert system.
Definition: Utils.h:21
virtual VxResult::Value SetAssociation(IVxDataSource &dataSource)=0
CPPCli::Results::Value CPPCli::Marker::SetCoordinates ( float  x,
float  y 
)

Sets the location of the marker on the associated drawing.

Parameters
xThe X coordinate.
yThe Y coordinate.
Returns
The Result of setting the coordinates.

Definition at line 45 of file Marker.cpp.

45  {
47 }
VxSdk::IVxMarker * _marker
Definition: Marker.h:131
Value
Values that represent the result of calls to the VideoXpert system.
Definition: Utils.h:21
virtual VxResult::Value SetCoordinates(float x, float y)=0

Member Data Documentation

VxSdk::IVxMarker* CPPCli::Marker::_marker
package

Definition at line 131 of file Marker.h.

Property Documentation

float CPPCli::Marker::Direction
getset

Gets or sets the angular coordinate indicating the direction, if any, that the marker is facing on a polar grid(e.g.: 0 (right), 90 (up), 180 (left), 270 (down)).

The angular direction.

Definition at line 74 of file Marker.h.

Drawing^ CPPCli::Marker::Drawing
get

Gets the drawing that this marker belongs to.

The drawing that this marker belongs to.

Definition at line 84 of file Marker.h.

System:: String^ CPPCli::Marker::Id
get

Gets the unique marker identifier.

The unique identifier.

Definition at line 93 of file Marker.h.

System:: String^ CPPCli::Marker::Name
getset

Gets or sets the friendly name of the marker.

The friendly name of the marker.

Definition at line 102 of file Marker.h.

float CPPCli::Marker::X
get

Gets the X coordinate.

The X coordinate.

Definition at line 116 of file Marker.h.

float CPPCli::Marker::Y
get

Gets the Y coordinate.

The Y coordinate.

Definition at line 125 of file Marker.h.


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