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