----------------------------------------------------------------------------- Get a list of associations for this group -----------------------------------------------------------------------------
| 426 | // Get a list of associations for this group |
| 427 | //----------------------------------------------------------------------------- |
| 428 | uint32 Group::GetAssociations |
| 429 | ( |
| 430 | uint8** o_associations |
| 431 | ) |
| 432 | { |
| 433 | size_t numNodes = m_associations.size(); |
| 434 | if( !numNodes ) |
| 435 | { |
| 436 | *o_associations = NULL; |
| 437 | return 0; |
| 438 | } |
| 439 | |
| 440 | uint8* associations = new uint8[numNodes]; // room for all associations, we only need room for the associations without instance |
| 441 | uint32 i = 0; |
| 442 | for( map<InstanceAssociation,AssociationCommandVec,classcomp>::iterator it = m_associations.begin(); it != m_associations.end(); ++it ) |
| 443 | { |
| 444 | if ( it->first.m_instance == 0x00) |
| 445 | { |
| 446 | associations[i++] = it->first.m_nodeId; |
| 447 | } |
| 448 | } |
| 449 | |
| 450 | *o_associations = associations; |
| 451 | return (uint32) i; |
| 452 | } |
| 453 | |
| 454 | //----------------------------------------------------------------------------- |
| 455 | // <Group::GetAssociations> |