コード例 #1
0
ファイル: workspace.cpp プロジェクト: capturePointer/codelite
void clCxxWorkspace::ReloadWorkspace()
{
    m_doc = wxXmlDocument();

    wxLogNull noLog;
    // reset the internal cache objects
    m_projects.clear();

    TagsManager* mgr = TagsManagerST::Get();
    mgr->CloseDatabase();

    wxString err_msg;
    if(!OpenWorkspace(m_fileName.GetFullPath(), err_msg)) {
        wxLogMessage(wxT("Reload workspace: ") + err_msg);
    }
}
コード例 #2
0
ファイル: aodriver.cpp プロジェクト: MattLatt/GDAL_2.0.x_VC
OGRDataSource *AODriver::Open( const char* pszFilename,
                              int bUpdate )

{
  // First check if we have to do any work.
  // In order to avoid all the COM overhead, we are going to check
  // if we have an AO prefix

  if( !EQUALN(pszFilename,"AO:",3) )
    return NULL;

  //OK, it is our turn, let's pay the price

  if (!Init())
  {
    return NULL;
  }

  const char* pInitString = pszFilename + 3; //skip chars


  IWorkspacePtr ipWorkspace = NULL;
  OpenWorkspace(pInitString, &ipWorkspace);

  if (ipWorkspace == NULL)
    return NULL;

  AODataSource* pDS;

  pDS = new AODataSource();

  if(!pDS->Open( ipWorkspace, pszFilename, bUpdate ) )
  {
    delete pDS;
    return NULL;
  }
  else
    return pDS;
}