gmio/src/gmio_stl/stl_error.h

61 lines
2.2 KiB
C
Raw Normal View History

2015-03-03 00:38:33 +08:00
/****************************************************************************
2015-05-28 15:40:24 +08:00
** gmio
2015-05-01 00:19:45 +08:00
** Copyright Fougue (2 Mar. 2015)
2015-07-13 17:42:03 +08:00
** contact@fougue.pro
2015-03-03 00:38:33 +08:00
**
** This software is a reusable library whose purpose is to provide complete
** I/O support for various CAD file formats (eg. STL)
**
** This software is governed by the CeCILL-B license under French law and
** abiding by the rules of distribution of free software. You can use,
** modify and/ or redistribute the software under the terms of the CeCILL-B
** license as circulated by CEA, CNRS and INRIA at the following URL
2015-03-30 15:05:25 +08:00
** "http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html".
2015-03-03 00:38:33 +08:00
****************************************************************************/
2015-03-05 01:25:51 +08:00
/*! \file stl_error.h
* List of errors specific to STL I/O functions
*/
#ifndef GMIO_STL_ERROR_H
#define GMIO_STL_ERROR_H
/*! A byte-mask to tag(identify) STL-specific error codes */
enum { GMIO_STL_ERROR_TAG = 0x11000000 };
/*! This enum defines the various error codes reported by STL read/write
* functions */
enum gmio_stl_error
{
/*! STL format could not be guessed in read function */
2015-05-28 22:19:31 +08:00
GMIO_STL_ERROR_UNKNOWN_FORMAT = GMIO_STL_ERROR_TAG + 0x01,
/*! Common STL write error indicating gmio_stl_mesh::func_get_triangle()
* pointer is NULL */
2015-05-28 22:19:31 +08:00
GMIO_STL_ERROR_NULL_GET_TRIANGLE_FUNC = GMIO_STL_ERROR_TAG + 0x02,
2015-03-03 17:35:36 +08:00
/* Specific error codes returned by STL_ascii read function */
/*! Parsing error occured due to malformed STL ascii input */
2015-05-28 22:19:31 +08:00
GMIO_STL_ERROR_PARSING = GMIO_STL_ERROR_TAG + 0x100,
/*! Invalid max number of decimal significants digits must be in [1..9] */
2015-05-28 22:19:31 +08:00
GMIO_STL_ERROR_INVALID_FLOAT32_PREC = GMIO_STL_ERROR_TAG + 0x101,
2015-03-03 17:35:36 +08:00
/* Specific error codes returned by STL_binary read/write functions */
/*! The byte order argument supplied is not supported, must be little or
* big endian */
2015-05-28 22:19:31 +08:00
GMIO_STL_ERROR_UNSUPPORTED_BYTE_ORDER = GMIO_STL_ERROR_TAG + 0x1000,
2015-03-03 17:35:36 +08:00
/*! Error occured when reading header data in gmio_stlb_read() */
2015-05-28 22:19:31 +08:00
GMIO_STL_ERROR_HEADER_WRONG_SIZE = GMIO_STL_ERROR_TAG + 0x1001,
2015-03-03 17:35:36 +08:00
/*! Error occured when reading facet count in gmio_stlb_read() */
2015-05-28 22:19:31 +08:00
GMIO_STL_ERROR_FACET_COUNT = GMIO_STL_ERROR_TAG + 0x1002
};
typedef enum gmio_stl_error gmio_stl_error_t;
#endif /* GMIO_STL_ERROR_H */