         
     }
     
+    
     //#pragma mark - CRUD Data
 
-    func register() -> CUnsignedLongLong {
-        
-        var pos: CUnsignedLongLong? = Array(unusedDataSegments.keys)[0]
-        
-        if pos {
-            //self.unusedDataSegments removeObject:unusedSegmentPos];
-            self.unusedDataSegments[pos!] = nil;
-        } else {
-            pos = self.extendFile()
-        }
-        
-        return pos!;
-    }
+
     
     override func create(data: NSData) -> UID  {
         

        }
    }
    
    // increase the virtual EndOfFile pointer by on dataSize
    func extendFile() -> CUnsignedLongLong {
        
        let pos = self.endOfFile
        
        self.endOfFile = pos + CUnsignedLongLong(sizeof(O))
        
        return pos;
    }
    
    // subclasses should overide this method
    // Create a file store element with the ID:0

            // store SampleData as ID:0 in the file
            // ID:0 is a reserved ID and should not be availabled for public access

            let aObj = O()
            
            var header = ObjectStoreHeader(used: false)
            
            self.writeHeader(&header)
            self.writeData(aObj.data, atPos: CUnsignedLongLong(self.fileOffset))
            
        }
        
