1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-08 18:40:55 +03:00
occt/src/PCDM/PCDM_StoreStatus.hxx
vro 632deee0b0 0032125: Application Framework, OCAF - need to have adequate message if document cannot be saved due to unrecognized format
A list of storage statuses (PCDM_StoreStatus) is extended for PCDM_SS_UnrecognizedFormat. It is set if
- extension of a document file name is not defined (the extension doesn't correspond to any declared file formats) or
- a storage driver is not found for the document storage format.

Modified:
CDF_StoreList.cxx: the mechanism of raising and catching exceptions is replaced by direct setting the status and error message for each particular error.
PCDM_StoreStatus.hxx: a new enumeration value is added - PCDM_SS_UnrecognizedFormat. Also, a short explanation is added to each enumeration value.
DDocStd_ApplicationCommands.cxx: processing of a new enumeration value by the draw-command.
XDEDRAW.cxx: processed a new enumeration value PCDM_SS_UnrecognizedFormat by saveDoc draw-command.

Deleted:
CDF_MetaDataDriverError.hxx: It is not used anywhere and it seems it will not be used by someone.
2021-09-03 20:19:55 +03:00

37 lines
1.7 KiB
C++

// Created on: 1997-08-01
// Created by: Jean-Louis Frenkel
// Copyright (c) 1997-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 _PCDM_StoreStatus_HeaderFile
#define _PCDM_StoreStatus_HeaderFile
//! Status of storage of a document on disk.
//! If it is PCDM_SS_OK, the document is successfully saved on disk.
//! Else - there is an error.
enum PCDM_StoreStatus
{
PCDM_SS_OK, //!< Document is saved successfully
PCDM_SS_DriverFailure, //!< Storage driver is not found
PCDM_SS_WriteFailure, //!< Attempt to write a file on disk failed
PCDM_SS_Failure, //!< A general error occurred (unexpected)
PCDM_SS_Doc_IsNull, //!< Attempt to save a null document
PCDM_SS_No_Obj, //!< Document has no objects to be saved
PCDM_SS_Info_Section_Error, //!< Error occured on writing of an information-section
PCDM_SS_UserBreak, //!< User interrupted the process of storage of the document on disk
PCDM_SS_UnrecognizedFormat //!< No storage driver exist for this document format
};
#endif // _PCDM_StoreStatus_HeaderFile