CacheEntry::IsValid |
Indicates whether or not a cache entry is valid.
bool IsValid() const;
Returns true if the cache entry is valid and false otherwise.
The following example demonstrates use of the IsValid function.
ViStatus _VI_FUNC acme4321_Configure(ViSession Vi, ViReal64 Frequency, ViReal64 Gain)
{
auto status = VI_SUCCESS;
// Retrieve the cache entry for the Bandwidth attribute
//
auto entry = GetCacheEntry<ViReal64>(Vi, ACME4321_ATTR_BANDWIDTH);
if (entry.IsValid())
{
// ...
}
return status;
}