Click or drag to resize

CacheEntry::IsValid

Indicates whether or not a cache entry is valid.

bool IsValid() const;
Return Value

Returns true if the cache entry is valid and false otherwise.

Example

The following example demonstrates use of the IsValid function.

C++
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;
}

Download a complete CHM version of this documentation here.