Files
cdev-1.7.2n/test/cdevCollection/attachCollection.cc
2022-12-13 12:44:04 +01:00

22 lines
842 B
C++
Executable File

#include <cdevCollection.h>
void main ( void )
{
/***************************************************************
* Obtain a reference to a cdevCollection device named
* "brandNew". Because this collection is not defined in the
* CDEV DDL file, it will be created with no constituent
* devices.
***************************************************************/
cdevCollection & brandNew = cdevCollection::attachRef("brandNew");
/***************************************************************
* Obtain a reference to a cdevCollection device named
* "cDevice1". This collection is defined in the CDEV DDL file
* and will be populated with the devices: "device0", "device1",
* and "device2".
***************************************************************/
cdevCollection * cDevice1 = cdevCollection::attachPtr("cDevice1");
}