} else if (aClass.Equals(kJAPSMDetectorCID)) { factory = NEW_JA_PSMDETECTOR_FACTORY(); } else if (aClass.Equals(kJAStringPSMDetectorCID)) { factory = NEW_JA_STRING_PSMDETECTOR_FACTORY(); } else if (aClass.Equals(kKOPSMDetectorCID)) { factory = NEW_KO_PSMDETECTOR_FACTORY(); } else if (aClass.Equals(kKOStringPSMDetectorCID)) { factory = NEW_KO_STRING_PSMDETECTOR_FACTORY(); } else if (aClass.Equals(kZHCNPSMDetectorCID)) { factory = NEW_ZHCN_PSMDETECTOR_FACTORY(); } else if (aClass.Equals(kZHCNStringPSMDetectorCID)) { factory = NEW_ZHCN_STRING_PSMDETECTOR_FACTORY(); } else if (aClass.Equals(kZHTWPSMDetectorCID)) { factory = NEW_ZHTW_PSMDETECTOR_FACTORY(); } else if (aClass.Equals(kZHTWStringPSMDetectorCID)) { factory = NEW_ZHTW_STRING_PSMDETECTOR_FACTORY(); } else if (aClass.Equals(kZHPSMDetectorCID)) { factory = NEW_ZH_PSMDETECTOR_FACTORY(); } else if (aClass.Equals(kZHStringPSMDetectorCID)) { factory = NEW_ZH_STRING_PSMDETECTOR_FACTORY(); } else if (aClass.Equals(kCJKPSMDetectorCID)) { factory = NEW_CJK_PSMDETECTOR_FACTORY(); } else if (aClass.Equals(kCJKStringPSMDetectorCID)) { factory = NEW_CJK_STRING_PSMDETECTOR_FACTORY();
} else if (aClass.Equals(kJAPSMDetectorCID) || aClass.Equals(kJAStringPSMDetectorCID) || aClass.Equals(kKOPSMDetectorCID) || aClass.Equals(kKOStringPSMDetectorCID) || aClass.Equals(kZHCNPSMDetectorCID) || aClass.Equals(kZHCNStringPSMDetectorCID) || aClass.Equals(kZHTWPSMDetectorCID) || aClass.Equals(kZHTWStringPSMDetectorCID) || aClass.Equals(kZHPSMDetectorCID) || aClass.Equals(kZHStringPSMDetectorCID) || aClass.Equals(kCJKPSMDetectorCID) || aClass.Equals(kCJKStringPSMDetectorCID) ) { factory = NEW_PSMDETECTOR_FACTORY(aClass); } else if (aClass.Equals(kRUProbDetectorCID) || aClass.Equals(kRUStringProbDetectorCID) || aClass.Equals(kUKProbDetectorCID) || aClass.Equals(kUKStringProbDetectorCID) ) { factory = NEW_PROBDETECTOR_FACTORY(aClass);
extern "C" NS_EXPORT nsresult NSGetFactory(nsISupports* aServMgr,                                           const nsCID &aClass,                                           const char *aClassName,                                           const char *aProgID,                                           nsIFactory **aFactory){  if (aFactory == NULL) {    return NS_ERROR_NULL_POINTER;  }  nsIFactory *factory = nsnull;  if (aClass.Equals(kMetaCharsetCID)) {    factory = NEW_META_CHARSET_OBSERVER_FACTORY();  } else if (aClass.Equals(kXMLEncodingCID)) {    factory = NEW_XML_ENCODING_OBSERVER_FACTORY();  } else if (aClass.Equals(kCharsetDetectionAdaptorCID)) {    factory = NEW_DETECTION_ADAPTOR_FACTORY();  } else if (aClass.Equals(kJAPSMDetectorCID)) {    factory = NEW_JA_PSMDETECTOR_FACTORY();  } else if (aClass.Equals(kJAStringPSMDetectorCID)) {    factory = NEW_JA_STRING_PSMDETECTOR_FACTORY();  } else if (aClass.Equals(kKOPSMDetectorCID)) {    factory = NEW_KO_PSMDETECTOR_FACTORY();  } else if (aClass.Equals(kKOStringPSMDetectorCID)) {    factory = NEW_KO_STRING_PSMDETECTOR_FACTORY();  } else if (aClass.Equals(kZHCNPSMDetectorCID)) {    factory = NEW_ZHCN_PSMDETECTOR_FACTORY();  } else if (aClass.Equals(kZHCNStringPSMDetectorCID)) {    factory = NEW_ZHCN_STRING_PSMDETECTOR_FACTORY();  } else if (aClass.Equals(kZHTWPSMDetectorCID)) {    factory = NEW_ZHTW_PSMDETECTOR_FACTORY();  } else if (aClass.Equals(kZHTWStringPSMDetectorCID)) {    factory = NEW_ZHTW_STRING_PSMDETECTOR_FACTORY();  } else if (aClass.Equals(kZHPSMDetectorCID)) {    factory = NEW_ZH_PSMDETECTOR_FACTORY();  } else if (aClass.Equals(kZHStringPSMDetectorCID)) {    factory = NEW_ZH_STRING_PSMDETECTOR_FACTORY();  } else if (aClass.Equals(kCJKPSMDetectorCID)) {    factory = NEW_CJK_PSMDETECTOR_FACTORY();  } else if (aClass.Equals(kCJKStringPSMDetectorCID)) {    factory = NEW_CJK_STRING_PSMDETECTOR_FACTORY();#ifdef INCLUDE_DBGDETECTOR  } else if (aClass.Equals(k1stBlkDbgDetectorCID)) {    factory = NEW_1STBLKDBG_DETECTOR_FACTORY();  } else if (aClass.Equals(k2ndBlkDbgDetectorCID)) {    factory = NEW_2NDBLKDBG_DETECTOR_FACTORY();  } else if (aClass.Equals(klastBlkDbgDetectorCID)) {    factory = NEW_LASTBLKDBG_DETECTOR_FACTORY();#endif /* INCLUDE_DBGDETECTOR */  }  if(nsnull != factory) {    nsresult res = factory->QueryInterface(kFactoryIID, (void **) aFactory);    if (NS_FAILED(res)) {      *aFactory = NULL;      delete factory;    }    return res;  }  return NS_NOINTERFACE;}