| 1829 | */ |
| 1830 | |
| 1831 | void CTaskManager::Load( CIcarus* icarus ) |
| 1832 | { |
| 1833 | unsigned char flags; |
| 1834 | CTaskGroup *taskGroup; |
| 1835 | CBlock *block; |
| 1836 | CTask *task; |
| 1837 | unsigned int timeStamp; |
| 1838 | bool completed; |
| 1839 | void *bData; |
| 1840 | int id, numTasks, numMembers; |
| 1841 | int bID, bSize; |
| 1842 | |
| 1843 | // Data expected/loaded here. |
| 1844 | // Taskmanager GUID. |
| 1845 | // Number of Tasks. |
| 1846 | // Tasks: |
| 1847 | // - GUID. |
| 1848 | // - Timestamp. |
| 1849 | // - Block/Command. |
| 1850 | // Number of task groups. |
| 1851 | // Task groups ID's. |
| 1852 | // Task groups (data). |
| 1853 | // - Parent. |
| 1854 | // - Number of Commands. |
| 1855 | // - Commands: |
| 1856 | // + ID. |
| 1857 | // + State of Completion. |
| 1858 | // - Number of Completed Commands. |
| 1859 | // Currently active group. |
| 1860 | // Task group names: |
| 1861 | // - String Size. |
| 1862 | // - String. |
| 1863 | // - ID. |
| 1864 | |
| 1865 | CIcarus *pIcarus = (CIcarus *)IIcarusInterface::GetIcarus(); |
| 1866 | |
| 1867 | //Get the GUID |
| 1868 | pIcarus->BufferRead( &m_GUID, sizeof( m_GUID ) ); |
| 1869 | |
| 1870 | //Get the number of tasks to follow |
| 1871 | pIcarus->BufferRead( &numTasks, sizeof( numTasks ) ); |
| 1872 | |
| 1873 | //Reload all the tasks |
| 1874 | for ( int i = 0; i < numTasks; i++ ) |
| 1875 | { |
| 1876 | task = new CTask; |
| 1877 | |
| 1878 | assert( task ); |
| 1879 | |
| 1880 | //Get the GUID |
| 1881 | pIcarus->BufferRead( &id, sizeof( id ) ); |
| 1882 | task->SetGUID( id ); |
| 1883 | |
| 1884 | //Get the time stamp |
| 1885 | pIcarus->BufferRead( &timeStamp, sizeof( timeStamp ) ); |
| 1886 | task->SetTimeStamp( timeStamp ); |
| 1887 | |
| 1888 | // |
nothing calls this directly
no test coverage detected