GenApi 3.5.1
Public Member Functions | Friends | List of all members
CFeatureBag Class Reference

Bag holding streamable features of a nodetree.

#include <Persistence.h>

Inherits IPersistScript.

Public Member Functions

virtual void SetInfo (const GENICAM_NAMESPACE::gcstring &Info)
 sets information about the node map
 
virtual void PersistFeature (IValue &item, CSelectorSet *selectorSet=NULL)
 Stores a feature.
 
bool LoadFromBag (INodeMap *pNodeMap, bool Verify=true, GENICAM_NAMESPACE::gcstring_vector *pErrorList=NULL)
 
int64_t StoreToBag (INodeMap *pNodeMap, const int MaxNumPersistSkriptEntries=-1, GENICAM_NAMESPACE::gcstring_vector *pFeatureFilter=NULL)
 Stores the streamable nodes to this feature bag.
 
bool operator== (const CFeatureBag &FeatureBag) const
 compares the content of two feature bags
 

Friends

std::istream & operator>> (std::istream &is, CFeatureBag &FeatureBag)
 fills the bag from a stream
 
std::ostream & operator<< (std::ostream &os, const CFeatureBag &FeatureBag)
 puts the bag into a stream
 

Member Function Documentation

◆ LoadFromBag()

bool LoadFromBag ( INodeMap * pNodeMap,
bool Verify = true,
GENICAM_NAMESPACE::gcstring_vector * pErrorList = NULL )

Loads the features from the bag to the node tree

Parameters
pNodeMapThe node map to load into
VerifyIf true, all streamable features are read back
pErrorListIf an error occurs during loading the error message is stored in the list and the loading continues

For Verify=true the list of names in the feature bag is replayed again. If a node is a selector it's value is set to the value from the feature bag If not the value is read from the camera and compared with the value from the feature bag.

◆ StoreToBag()

int64_t StoreToBag ( INodeMap * pNodeMap,
const int MaxNumPersistSkriptEntries = -1,
GENICAM_NAMESPACE::gcstring_vector * pFeatureFilter = NULL )
Parameters
pNodeMapThe node map to persist
MaxNumPersistSkriptEntriesThe max number of entries in the container; -1 means unlimited
pFeatureFilterList of valid feature; all feature if NULL.
Returns
number of entries in the bag