This plugin sample delete a selected drawing from the current system.
More...
#include <DeleteDrawing.h>
This plugin sample delete a selected drawing from the current system.
Definition at line 12 of file DeleteDrawing.h.
Inherits CppSamples::Common::Plugin.
CppSamples::Drawings::DeleteDrawing::DeleteDrawing |
( |
const std::string |
description | ) |
|
|
inline |
Definition at line 14 of file DeleteDrawing.h.
Plugin is the abstract class which can be a menu item and/or a sample. Every sample and menu item mus...
CppSamples::Drawings::DeleteDrawing::~DeleteDrawing |
( |
| ) |
|
|
inline |
Get a collection of drawings from the given VideoExpert system.
- Parameters
-
vxSystem | Pointer to the VideoExpert system. |
- Returns
- A collection of drawings.
Definition at line 45 of file DeleteDrawing.cpp.
48 if (result == VxResult::kInsufficientSize) {
virtual VxResult::Value GetDrawings(VxCollection< IVxDrawing ** > &drawingCollection) const =0
Prints the given collection of drawings to the screen.
- Parameters
-
drawingCollection | Collection of drawings. |
Definition at line 59 of file DeleteDrawing.cpp.
61 cout << drawingCollection.
collectionSize <<
" drawings found." <<
"\n";
65 cout <<
"---------------------------------------------------------------------------------------------";
69 cout <<
"\n" << (i + 1);
70 cout <<
"\t" << drawing->
id;
71 cout <<
"\t" << drawing->
name;
73 cout <<
"\n---------------------------------------------------------------------------------------------\n";
Delete a selected drawing from the current system.
- Parameters
-
dataModel | Instance of data model. |
Implements CppSamples::Common::Plugin.
Definition at line 13 of file DeleteDrawing.cpp.
14 Utility::ClearScreen();
24 if (result == VxResult::kOK)
25 cout <<
"\n" <<
"Drawing deleted succesfully.\n";
27 cout <<
"\n" <<
"Failed to delete drawing!!\n";
VxSdk::IVxSystem * VxSystem
Represents a VideoXpert system and allows the user to manage the system and devices.
static void PrintDrawings(VxSdk::VxCollection< VxSdk::IVxDrawing ** > drawingCollection)
Prints the given collection of drawings to the screen.
static VxSdk::VxCollection< VxSdk::IVxDrawing ** > GetDrawings(VxSdk::IVxSystem *vxSystem)
Get a collection of drawings from the given VideoExpert system.
Plugin * GetParent() const
Gets the reference to the parent of this plugin.
virtual VxResult::Value DeleteDrawing() const =0
int SelectDrawingIndex(VxSdk::VxCollection< VxSdk::IVxDrawing ** > &drawings)
Select a drawing from the given collection by user input.
Select a drawing from the given collection by user input.
- Parameters
-
drawings | Collection of drawing. |
- Returns
- Index of the selected drawing in the given collection.
Definition at line 81 of file DeleteDrawing.cpp.
83 cout <<
"\n" <<
"Enter drawing number [1-" << drawings.
collectionSize <<
"] : ";
84 int index = Utility::ReadInt();
90 cout <<
"\n" <<
"Invalid Option !!!";
92 cout <<
"\n" <<
"Enter 0 to go back.";
The documentation for this class was generated from the following files: