----------------------------------------------------------------------------- Read the saved association data -----------------------------------------------------------------------------
| 68 | // Read the saved association data |
| 69 | //----------------------------------------------------------------------------- |
| 70 | void MultiChannelAssociation::ReadXML |
| 71 | ( |
| 72 | TiXmlElement const* _ccElement |
| 73 | ) |
| 74 | { |
| 75 | CommandClass::ReadXML( _ccElement ); |
| 76 | |
| 77 | TiXmlElement const* associationsElement = _ccElement->FirstChildElement(); |
| 78 | while( associationsElement ) |
| 79 | { |
| 80 | char const* str = associationsElement->Value(); |
| 81 | if( str && !strcmp( str, "Associations" ) ) |
| 82 | { |
| 83 | int intVal; |
| 84 | if( TIXML_SUCCESS == associationsElement->QueryIntAttribute( "num_groups", &intVal ) ) |
| 85 | { |
| 86 | m_numGroups = (uint8)intVal; |
| 87 | } |
| 88 | |
| 89 | TiXmlElement const* groupElement = associationsElement->FirstChildElement(); |
| 90 | while( groupElement ) |
| 91 | { |
| 92 | if( Node* node = GetNodeUnsafe() ) |
| 93 | { |
| 94 | Group* group = new Group( GetHomeId(), GetNodeId(), groupElement ); |
| 95 | node->AddGroup( group ); |
| 96 | } |
| 97 | |
| 98 | groupElement = groupElement->NextSiblingElement(); |
| 99 | } |
| 100 | |
| 101 | break; |
| 102 | } |
| 103 | |
| 104 | associationsElement = associationsElement->NextSiblingElement(); |
| 105 | } |
| 106 | |
| 107 | } |
| 108 | |
| 109 | //----------------------------------------------------------------------------- |
| 110 | // <MultiChannelAssociation::WriteXML> |
nothing calls this directly
no test coverage detected