12,13d11
< //#include <fstream>
< 
15a14
> #include "BlockStruct.h"
16a16,17
> #include "DataNotFoundException.h"
> 
22c23,24
<     enum { LABEL_SIZE = FssimApp::MAX_LABEL_LENGTH };
---
>     Block(BlockStruct* pBlockStruct = 0) : m_pStruct(pBlockStruct) {} // constructor
>     virtual ~Block() {} // destructor
24,25c26
<     Block(BLOCK* pBlockStruct = 0); // constructor
<     virtual ~Block(); // destructor
---
>     void serialize( Serializer& binaryArchive );
27d27
<     void serialize( Serializer& binaryArchive ); //throw (FileException);
29,40d28
< 
<     bool hasNeighbours() { return (0 != m_pStruct->Neighbours); }
< 
<     static int lookupBlockID(const string& label);
<     static string lookupBlockLabel(const int id);
< 
<     BLOCK* getStruct() { return m_pStruct; }
< 
<     static BLOCK* lookupBLOCKAddress(int id)
<     {
<         return m_structMemoryAddresses[id - 1];
<     }
43c31
<     void recreateStruct(char* label);
---
>     void recreateStruct(const char* label, const int id);
45,46d32
<     void recreateNeighbourStructureList(vector<Block>& blockList);
<     void createNeighbourIndexList();
48,69c34
<     BLOCK* m_pStruct;
<     list<int> m_neighbourIndices;
<     int m_index;
< 
<     static int m_blockCount;
< 
<    /*class IndexAndAddress // size and position of data for a file entry
<    {
<    public:
<       IndexAndAddress(const int index = 0, const BLOCK* address = 0)
<        : m_index(index), m_address(address) {} // constructor
<    public: // data still private to Block
<       int m_index;
<       int m_address;
<    };*/
< 
<     static map<string, int> m_labelIndex;
<     static vector<string> m_indexLabels;
<     typedef map<string, int>::iterator AIndexIterator;
<     typedef map<string, int>::const_iterator AConstIndexIterator;
< 
<     static vector<BLOCK*> m_structMemoryAddresses;
---
>     BlockStruct* m_pStruct;
72,101d36
< inline int Block::lookupBlockID(const string& label)
< {
<     // lookup neighbour's index in map by label
<     AConstIndexIterator item = m_labelIndex.find(label);
<     if ( item != m_labelIndex.end() )
<     {
<         return ( (item->second) );
<     }
<     else
<     {
<         string message = "Block not found in labelIndex map";
<         throw (message);
<     }
<     return -1;
< }
< 
< inline string Block::lookupBlockLabel(const int id)
< {
<     // lookup neighbour's index in map by label
<     if( 0 < id || id < m_indexLabels.size() ) // warning signed/unsigned compare
<     {
<         return m_indexLabels[id - 1];
<     }
<     else
<     {
<         throw range_error("Block id is out of the bounds of the vector.");
<     }
<     return 0;
< }
< 
