     
 }
 
+
+extension NSString {
+
+    @objc override public func FC_encodeWithCoder(aCoder: FCCoder) {
+        
+        if self is NSMutableString   {
+            if DataCoder.FCWriteObjectAlias(self, coder: aCoder) { return }
+            aCoder.FCCacheWrittenObject(self)
+            DataCoder.FCWriteType(.FCTypeMutableString, output:aCoder.output);
+        } else {
+            if DataCoder.FCWriteStringAlias(self, coder: aCoder) { return }
+            //FCCacheWrittenObject(self, coder->_stringCache);
+            //FCWriteType(FCTypeString, coder->_output);
+        }
+        
+        DataCoder.FCWriteString(self, output: aCoder.output)
+    }
+
+}
+
+extension NSNumber {
+    
+    @objc override public func FC_encodeWithCoder(aCoder: FCCoder) {
+        
+    }
+}
+
+extension NSDecimalNumber {
+    
+    @objc override public func FC_encodeWithCoder(aCoder: FCCoder) {
+        
+    }
+}
+
+extension NSDate {
+    
+    @objc override public func FC_encodeWithCoder(aCoder: FCCoder) {
+        
+    }
+}
+
+extension NSData {
+    
+    @objc override public func FC_encodeWithCoder(aCoder: FCCoder) {
+        
+    }
+}
+
+extension NSNull {
+    
+    @objc override public func FC_encodeWithCoder(aCoder: FCCoder) {
+        
+    }
+}
+
+extension NSDictionary {
+    
+    @objc override public func FC_encodeWithCoder(aCoder: FCCoder) {
+        
+    }
+}
+
+extension NSSet {
+    
+    @objc override public func FC_encodeWithCoder(aCoder: FCCoder) {
+        
+    }
+}
+
+extension NSOrderedSet {
+    
+    @objc override public func FC_encodeWithCoder(aCoder: FCCoder) {
+        
+    }
+}
+
+extension NSIndexSet {
+    
+    @objc override public func FC_encodeWithCoder(aCoder: FCCoder) {
+        
+    }
+}
+extension NSURL {
+    
+    @objc override public func FC_encodeWithCoder(aCoder: FCCoder) {
+        if DataCoder.FCWriteStringAlias(self, coder: aCoder) { return }
+        DataCoder.FCWriteType(.FCTypeURL, output:aCoder.output);
+        DataCoder.FCWriteObject(self.relativeString, coder: aCoder)
+        //FCWriteObject(self.relativeString, coder);
+        DataCoder.FCWriteObject(self.baseURL, coder: aCoder)
+        //FCWriteObject(self.baseURL, coder);
+        
+        //aCoder.FCCacheWrittenString(self.)
+        // TODO: is string cache here an bug?
+        //FCCacheWrittenObject(self, coder->_stringCache);
+    }
+}
+extension NSValue {
+    
+    @objc override public func FC_encodeWithCoder(aCoder: FCCoder) {
+        
+    }
+}
+
 // --------------------------------------------------------------------------------
 
-class DCCoder : NSCoder {
+public class FCCoder : NSCoder {
 
     var rootObject : NSObject! = nil
     var output : NSMutableData! = nil

        coder.classesByName  = classesByName
        
        //write object
        DCWriteObject(object, coder: coder)
        
        // no spport for FC_DIAGNOSTIC_ENABLED
        

    }

    
    static func FCWriteObjectAlias(object : NSObject, coder : FCCoder) -> Bool {
        
        let max8 = Int(UInt8.max)
        let max16 = Int(UInt16.max)
