AddEnumEntry
Top  Previous  Next

Description

Adds an entry to the specified enumerated feature and sets up the parameters of the entry.

[C++]
int
 AddEnumEntry(const char* feature, const char* name, unsigned int value);


Parameters
[C/C++]
 
[in] const char* feature  
Name of the feature. Must be an existing feature of the enumerated type.  
 
[in] const char* name  
Name of the entry to be added. Must not be NULL or empty.  
 
[in] unsigned int value  
Numerical value associated with the entry.  
 

Return Values


S_OK  
Success  
E_FAIL  
Failure  
E_NOINTERFACE  
Feature does not exist  
E_INVALIDARG  
Entry with this value already exist  
 

Example


This fragment of code instantiates a camera object, creates an enumerated feature and sets up a list of three entries:

static CGevCamera* m_pCamera;  
m_pCamera = createCamera();  
m_pCamera->CreateFeature(FEATURE_TYPE_ENUMERATION, "TestImageSelector", "Root", FEATURE_ACCESS_RW);  
 
m_pCamera->AddEnumEntry("TestImageSelector", "First pattern", 1);  
m_pCamera->AddEnumEntry("TestImageSelector", "Second pattern", 2);  
m_pCamera->AddEnumEntry("TestImageSelector", "Third pattern", 3);  


Remarks


This method should be used after calling CreateFeature in order to finalize the setup of a feature of the enumerated type.

Note that the camera must be in the disconnected state in order for this method to work.