1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0027350: Support for Universal Windows Platform

- Toolchain file to configure a Visual Studio generator for a Windows 10 Universal Application was added (CMake).
- There is no support for environment variables in UWP.
- SID is not supported (were excluded).
- Windows registry is not supported (were excluded).
- Mess with usage of Unicode/ANSI was corrected.
- Added sample to check UWP functionality.
- Excluded usage of methods with Unicode characters where it is possible.
- Minor corrections to allow building OCAF (except TKVCAF) and DE (except VRML and XDE)
- Building of unsupported modules for UWP platform is off by default .
- Checking of DataExchange functionality was added to XAML (UWP) sample.
- Added information about UWP to the documentation.
- Update of results of merge with issue 27801
This commit is contained in:
ski
2016-08-12 18:38:48 +03:00
committed by abv
parent f3ec3b372c
commit 742cc8b01d
69 changed files with 1526 additions and 639 deletions

View File

@@ -32,52 +32,14 @@ class CDF_Store;
class CDF_MetaDataDriver;
class CDF_FWOSDriver;
class CDF_MetaDataDriverFactory;
class CDF_Timer;
class CDF
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT static void GetLicense (const Standard_Integer anApplicationIdentifier);
Standard_EXPORT static Standard_Boolean IsAvailable (const Standard_Integer anApplicationIdentifier);
protected:
private:
friend class CDF_Directory;
friend class CDF_DirectoryIterator;
friend class CDF_Session;
friend class CDF_Application;
friend class CDF_StoreList;
friend class CDF_Store;
friend class CDF_MetaDataDriver;
friend class CDF_FWOSDriver;
friend class CDF_MetaDataDriverFactory;
friend class CDF_Timer;
};
#endif // _CDF_HeaderFile

View File

@@ -20,7 +20,6 @@
#include <CDF_Directory.hxx>
#include <CDF_MetaDataDriver.hxx>
#include <CDF_Session.hxx>
#include <CDF_Timer.hxx>
#include <CDM_CanCloseStatus.hxx>
#include <CDM_Document.hxx>
#include <CDM_MetaData.hxx>
@@ -99,11 +98,8 @@ Handle(CDM_Document) CDF_Application::Retrieve(const TCollection_ExtendedString&
Handle(CDM_Document) CDF_Application::Retrieve(const TCollection_ExtendedString& aFolder,
const TCollection_ExtendedString& aName,
const TCollection_ExtendedString& aVersion,
const Standard_Boolean UseStorageConfiguration) {
#ifdef OCCT_DEBUG
CDF_Timer theTimer;
#endif
const Standard_Boolean UseStorageConfiguration)
{
Handle(CDM_MetaData) theMetaData;
if(aVersion.Length() == 0)
@@ -111,28 +107,14 @@ Handle(CDM_Document) CDF_Application::Retrieve(const TCollection_ExtendedString
else
theMetaData=theMetaDataDriver->MetaData(aFolder,aName,aVersion);
#ifdef OCCT_DEBUG
theTimer.ShowAndRestart("Getting MetaData: ");
#endif
CDF_TypeOfActivation theTypeOfActivation=TypeOfActivation(theMetaData);
Handle(CDM_Document) theDocument=Retrieve(theMetaData,UseStorageConfiguration,Standard_False);
#ifdef OCCT_DEBUG
theTimer.ShowAndRestart("Creating Transient: ");
#endif
CDF_Session::CurrentSession()->Directory()->Add(theDocument);
Activate(theDocument,theTypeOfActivation);
#ifdef OCCT_DEBUG
theTimer.ShowAndStop("Activate: ");
#endif
theDocument->Open(this);
return theDocument;
}
//=======================================================================
@@ -150,25 +132,13 @@ PCDM_ReaderStatus CDF_Application::CanRetrieve(const TCollection_ExtendedString&
//=======================================================================
PCDM_ReaderStatus CDF_Application::CanRetrieve(const TCollection_ExtendedString& aFolder, const TCollection_ExtendedString& aName, const TCollection_ExtendedString& aVersion) {
#ifdef OCCT_DEBUG
CDF_Timer theTimer;
#endif
if (!theMetaDataDriver->Find(aFolder,aName,aVersion))
return PCDM_RS_UnknownDocument;
else if (!theMetaDataDriver->HasReadPermission(aFolder,aName,aVersion))
return PCDM_RS_PermissionDenied;
else {
#ifdef OCCT_DEBUG
theTimer.ShowAndRestart("theMetaDataDriver->Find: ");
#endif
Handle(CDM_MetaData) theMetaData = theMetaDataDriver->MetaData(aFolder,aName,aVersion);
#ifdef OCCT_DEBUG
theTimer.ShowAndStop("Getting MetaData: ");
#endif
if(theMetaData->IsRetrieved()) {
return theMetaData->Document()->IsModified()
? PCDM_RS_AlreadyRetrievedAndModified : PCDM_RS_AlreadyRetrieved;
@@ -199,11 +169,8 @@ PCDM_ReaderStatus CDF_Application::CanRetrieve(const TCollection_ExtendedString&
}
}
return PCDM_RS_OK;
}
//=======================================================================
//function : Activate
//purpose :

View File

@@ -20,7 +20,6 @@
#include <CDF_MetaDataDriverError.hxx>
#include <CDF_Session.hxx>
#include <CDF_StoreList.hxx>
#include <CDF_Timer.hxx>
#include <CDM_Document.hxx>
#include <CDM_MetaData.hxx>
#include <CDM_ReferenceIterator.hxx>
@@ -28,9 +27,7 @@
#include <PCDM_Document.hxx>
#include <PCDM_StorageDriver.hxx>
#include <Standard_ErrorHandler.hxx>
#include <Standard_Macro.hxx>
#include <Standard_NoSuchObject.hxx>
#include <Standard_Type.hxx>
#include <TCollection_ExtendedString.hxx>
IMPLEMENT_STANDARD_RTTIEXT(CDF_StoreList,Standard_Transient)
@@ -112,15 +109,9 @@ PCDM_StoreStatus CDF_StoreList::Store (Handle(CDM_MetaData)& aMetaData, TCollect
}
TCollection_ExtendedString theName=theMetaDataDriver->BuildFileName(theDocument);
CDF_Timer theTimer;
aDocumentStorageDriver->Write(theDocument,theName);
status = aDocumentStorageDriver->GetStoreStatus();
theTimer.ShowAndRestart("Driver->Write: ");
aMetaData = theMetaDataDriver->CreateMetaData(theDocument,theName);
theTimer.ShowAndStop("metadata creating: ");
theDocument->SetMetaData(aMetaData);
CDM_ReferenceIterator it(theDocument);

View File

@@ -1,49 +0,0 @@
// Created on: 1998-07-17
// Created by: Jean-Louis Frenkel
// Copyright (c) 1998-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <CDF_Timer.hxx>
#include <stdlib.h>
CDF_Timer::CDF_Timer() {
myTimer.Start();
}
void CDF_Timer::ShowAndRestart(const Standard_CString aMessage) {
if(MustShow()) {
Show(aMessage);
myTimer.Reset();
myTimer.Start();
}
}
void CDF_Timer::ShowAndStop(const Standard_CString aMessage) {
if(MustShow()) {
Show(aMessage);
myTimer.Stop();
}
}
void CDF_Timer::Show(const Standard_CString aMessage) {
Standard_Integer minutes,hours; Standard_Real seconds,CPUtime;
myTimer.Show(seconds,minutes,hours,CPUtime);
cout << aMessage << hours << "h " << minutes << "' " << seconds << "'' (cpu: " << CPUtime << ")" << endl;
}
Standard_Boolean CDF_Timer::MustShow() {
static Standard_Boolean theMustShow=getenv("STORETIMER") != NULL;
return theMustShow;
}

View File

@@ -1,71 +0,0 @@
// Created on: 1998-07-17
// Created by: Jean-Louis Frenkel
// Copyright (c) 1998-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _CDF_Timer_HeaderFile
#define _CDF_Timer_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <OSD_Timer.hxx>
#include <Standard_CString.hxx>
#include <Standard_Boolean.hxx>
class CDF_Timer
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT CDF_Timer();
Standard_EXPORT void ShowAndRestart (const Standard_CString aMessage);
Standard_EXPORT void ShowAndStop (const Standard_CString aMessage);
Standard_EXPORT Standard_Boolean MustShow();
protected:
private:
Standard_EXPORT void Show (const Standard_CString aMessage);
OSD_Timer myTimer;
};
#endif // _CDF_Timer_HeaderFile

View File

@@ -21,7 +21,5 @@ CDF_StoreList.cxx
CDF_StoreList.hxx
CDF_StoreSetNameStatus.hxx
CDF_SubComponentStatus.hxx
CDF_Timer.cxx
CDF_Timer.hxx
CDF_TryStoreStatus.hxx
CDF_TypeOfActivation.hxx