Click or drag to resize

PhysicalNameList Class

The PhysicalNameList class is simply an alias for a std::vector of PhysicalName objects and is declared as follows:

C++
template <typename TRepCap>
using PhysicalNameList = std::vector < PhysicalName<TRepCap> > ;
Remarks

For nested repeated capabilities, each child instance exists in a list maintained on the parent instance. The ParentList function returns that list, which contains the current physical name and all of its "sibling" physical names.

Example

The PhysicalNameList class is typically received as an output parameter from the ExpandSelector function on a repeated capability class as demonstrated in the example below.

C++
ViStatus _VI_FUNC acme4321_ConfigureArmCount(ViSession Vi, ViConstString RepCapIdentifier, ViInt32 ArmCount)
{
    // ...

    PhysicalNameList<Channel> physicalNames;
    ReturnOnError(Channel::ExpandSelector(Vi, ChannelName, physicalNames));

    for (const auto& physicalName : physicalNames)
    {
        cout << physicalName.Name();
    }

    // If the supplied RepCapIdentifier parameter represented a range of physical names,
    // such as CH1-CH4, then the above would print the following:
    // 
    //    C1
    //    C2
    //    C3
    //    C4
    // 
}

Download a complete CHM version of this documentation here.