Logo Search packages:      
Sourcecode: codeblocks version File versions  Download package

cbWorkspace::cbWorkspace ( const wxString &  filename = DEFAULT_WORKSPACE )

Constructor.

Parameters:
filenameThe file from which to load the workspace. If this parameter is empty, the default workspace is loaded.

Definition at line 26 of file cbworkspace.cpp.

                                                 :
    m_IsOK(true),
    m_IsDefault(true),
    m_Modified(false),
    m_Filename(DEFAULT_WORKSPACE),
    m_Title(_("Default workspace"))
{
    //ctor
    if ( filename.Matches(DEFAULT_WORKSPACE) || filename.IsEmpty() )
    {
        // if no filename given, use the default workspace
        wxString tmp = ConfigManager::GetConfigFolder() + wxFILE_SEP_PATH;

        if (!wxDirExists(tmp))
            wxMkdir(tmp, 0755);

        tmp << wxFILE_SEP_PATH << DEFAULT_WORKSPACE;
        m_Filename = tmp;
    }
    else
    {
        m_Filename = filename;
        m_IsDefault = false;
    }

    if ( !filename.IsEmpty() )
    {
        Load();
    }
}

Generated by  Doxygen 1.6.0   Back to index