コード例 #1
0
ファイル: QTSSModule.cpp プロジェクト: JeffreyLau/EasyDarwin
    fPrefs(NULL),
    fAttributes(NULL)
{

    fQueueElem.SetEnclosingObject(this);
    this->SetTaskName("QTSSModule");
    if ((inPath != NULL) && (inPath[0] != '\0'))
    {
        // Create a code fragment if this module is being loaded from disk
        
        fFragment = NEW OSCodeFragment(inPath);
        fPath = NEW char[::strlen(inPath) + 2];
        ::strcpy(fPath, inPath);
    }
    
    fAttributes = NEW QTSSDictionary( NULL, &fAttributesMutex );
    
    this->SetVal(qtssModPrefs,      &fPrefs,            sizeof(fPrefs));
    this->SetVal(qtssModAttributes, &fAttributes,       sizeof(fAttributes));
    
    // If there is a name, copy it into the module object's internal buffer
    if (inName != NULL)
        this->SetValue(qtssModName, 0, inName, ::strlen(inName), QTSSDictionary::kDontObeyReadOnly);
                
    ::memset(fRoleArray, 0, sizeof(fRoleArray));
    ::memset(&fModuleState, 0, sizeof(fModuleState));

}

QTSS_Error  QTSSModule::SetupModule(QTSS_CallbacksPtr inCallbacks, QTSS_MainEntryPointPtr inEntrypoint)
{
コード例 #2
0
ファイル: QTSSDictionary.cpp プロジェクト: mstorsjo/dss
QTSSDictionary* QTSSDictionary::CreateNewDictionary(QTSSDictionaryMap* inMap, OSMutex* inMutex)
{
    return NEW QTSSDictionary(inMap, inMutex);
}