Removed needless comment lines and doxygen tags

This commit is contained in:
Hugues Delorme 2015-03-03 11:35:15 +01:00
parent 6481a97b34
commit 31e8daca93
33 changed files with 164 additions and 213 deletions

View File

@ -1,5 +1,4 @@
#############################################################################
##
## GeomIO Library
## Copyright FougSys (2 Mar. 2015)
## contact@fougsys.fr
@ -12,7 +11,6 @@
## 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
## "http://www.cecill.info".
##
#############################################################################
cmake_minimum_required(VERSION 2.6)

View File

@ -1,5 +1,4 @@
/****************************************************************************
**
** GeomIO Library
** Copyright FougSys (2 Mar. 2015)
** contact@fougsys.fr
@ -12,7 +11,6 @@
** 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
** "http://www.cecill.info".
**
****************************************************************************/
/* Generated by CMake */

View File

@ -1,5 +1,4 @@
/****************************************************************************
**
** GeomIO Library
** Copyright FougSys (2 Mar. 2015)
** contact@fougsys.fr
@ -12,7 +11,6 @@
** 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
** "http://www.cecill.info".
**
****************************************************************************/
#include "endian.h"

View File

@ -1,5 +1,4 @@
/****************************************************************************
**
** GeomIO Library
** Copyright FougSys (2 Mar. 2015)
** contact@fougsys.fr
@ -12,7 +11,6 @@
** 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
** "http://www.cecill.info".
**
****************************************************************************/
#ifndef GMIO_ENDIAN_H

View File

@ -1,5 +1,4 @@
/****************************************************************************
**
** GeomIO Library
** Copyright FougSys (2 Mar. 2015)
** contact@fougsys.fr
@ -12,7 +11,6 @@
** 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
** "http://www.cecill.info".
**
****************************************************************************/
#include "error.h"

View File

@ -1,5 +1,4 @@
/****************************************************************************
**
** GeomIO Library
** Copyright FougSys (2 Mar. 2015)
** contact@fougsys.fr
@ -12,7 +11,6 @@
** 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
** "http://www.cecill.info".
**
****************************************************************************/
#ifndef GMIO_ERROR_H
@ -37,10 +35,11 @@ enum gmio_error
/*! Argument buffer's size is too small */
GMIO_INVALID_BUFFER_SIZE_ERROR = -3,
/*! An error occurred with the argument gmio_stream_t (check gmio_stream_error()) */
/*! An error occurred with the argument gmio_stream_t */
GMIO_STREAM_ERROR = -4,
/*! Operation was stopped by user (gmio_task_control::handle_progress_func() returned GMIO_FALSE) */
/*! Operation was stopped by user, that is to say
* gmio_task_control::is_stop_requested_func() returned GMIO_FALSE */
GMIO_TASK_STOPPED_ERROR = -5
};

View File

@ -1,5 +1,4 @@
/****************************************************************************
**
** GeomIO Library
** Copyright FougSys (2 Mar. 2015)
** contact@fougsys.fr
@ -12,14 +11,14 @@
** 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
** "http://www.cecill.info".
**
****************************************************************************/
#ifndef GMIO_GLOBAL_H
#define GMIO_GLOBAL_H
#if defined(WIN64) || defined(_WIN64) || defined(__WIN64__) \
|| defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)
|| defined(WIN32) || defined(_WIN32) || defined(__WIN32__) \
|| defined(__NT__)
# define GMIO_DECL_EXPORT __declspec(dllexport)
# define GMIO_DECL_IMPORT __declspec(dllimport)
#else
@ -37,8 +36,10 @@
# define GMIO_LIB_EXPORT
#endif /* GMIO_LIB_DLL */
/* "config.h" is generated by cmake, it should reside in the out-of-source build dir.
* In CMakeFiles.txt, the directory where resides "config.h" is added to the include path list
/* "config.h" is generated by cmake, it should reside in the out-of-source
* build dir.
* In CMakeFiles.txt, the directory where resides "config.h" is added to the
* include path list
*/
#include "config.h"

View File

@ -1,5 +1,4 @@
/****************************************************************************
**
** GeomIO Library
** Copyright FougSys (2 Mar. 2015)
** contact@fougsys.fr
@ -12,17 +11,17 @@
** 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
** "http://www.cecill.info".
**
****************************************************************************/
/* Warning : this header has no multi-inclusion guard. It must be included only once in the
* translation unit of use. The reason is that all functions defined here are meant to
* be inlined for performance purpose
/* WARNING :
* this header has no multi-inclusion guard. It must be included only once
* in the translation unit of use. The reason is that all functions
* defined here are meant to be inlined for performance purpose
*/
#include "../global.h"
/*! Read a 16bit integer from memory-location \p bytes (little-endian byte order) */
/*! Reads a 16bit integer from memory-location \p bytes (little-endian) */
GMIO_INLINE static uint16_t gmio_decode_uint16_le(const uint8_t* bytes)
{
/* |0 |1 | */
@ -30,7 +29,7 @@ GMIO_INLINE static uint16_t gmio_decode_uint16_le(const uint8_t* bytes)
return (bytes[1] << 8) | bytes[0];
}
/*! Read a 16bit integer from memory-location \p bytes (big-endian byte order) */
/*! Reads a 16bit integer from memory-location \p bytes (big-endian) */
GMIO_INLINE static uint16_t gmio_decode_uint16_be(const uint8_t* bytes)
{
/* |0 |1 | */
@ -38,35 +37,37 @@ GMIO_INLINE static uint16_t gmio_decode_uint16_be(const uint8_t* bytes)
return (bytes[0] << 8) | bytes[1];
}
/*! Write 16bit integer \p val to the memory location at \p bytes in little-endian byte order */
/*! Writes 16bit integer \p val to the memory location at \p bytes in
* little-endian */
GMIO_INLINE static void gmio_encode_uint16_le(uint16_t val, uint8_t* bytes)
{
bytes[0] = val & 0xFF;
bytes[1] = (val >> 8) & 0xFF;
}
/*! Read a 32bit integer from memory-location \p bytes (little-endian byte order) */
/*! Reads a 32bit integer from memory-location \p bytes (little-endian) */
GMIO_INLINE static uint32_t gmio_decode_uint32_le(const uint8_t* bytes)
{
/* |DD|CC|BB|AA| -> 0xAABBCCDD */
return bytes[0] | (bytes[1] << 8) | (bytes[2] << 16) | (bytes[3] << 24);
}
/*! Read a 32bit integer from memory-location \p bytes (mixed-endian byte order) */
/*! Reads a 32bit integer from memory-location \p bytes (mixed-endian) */
GMIO_INLINE static uint32_t gmio_decode_uint32_me(const uint8_t* bytes)
{
/* |DD|CC|BB|AA| -> 0xCCDDAABB */
return (bytes[0] << 16) | (bytes[1] << 24) | (bytes[3] << 8) | bytes[2];
}
/*! Read a 32bit integer from memory-location \p bytes (big-endian byte order) */
/*! Reads a 32bit integer from memory-location \p bytes (big-endian) */
GMIO_INLINE static uint32_t gmio_decode_uint32_be(const uint8_t* bytes)
{
/* |DD|CC|BB|AA| -> 0xDDCCBBAA */
return bytes[3] | (bytes[2] << 8) | (bytes[1] << 16) | (bytes[0] << 24);
}
/*! Write 32bit integer \p val to the memory location at \p bytes in little-endian byte order */
/*! Writes 32bit integer \p val to the memory location at \p bytes in
* little-endian */
GMIO_INLINE static void gmio_encode_uint32_le(uint32_t val, uint8_t* bytes)
{
bytes[0] = val & 0xFF;
@ -75,7 +76,8 @@ GMIO_INLINE static void gmio_encode_uint32_le(uint32_t val, uint8_t* bytes)
bytes[3] = (val >> 24) & 0xFF;
}
/*! Write 32bit integer \p val to the memory location at \p bytes in big-endian byte order */
/*! Writes 32bit integer \p val to the memory location at \p bytes in
* big-endian */
GMIO_INLINE static void gmio_encode_uint32_be(uint32_t val, uint8_t* bytes)
{
bytes[0] = (val >> 24) & 0xFF;

View File

@ -1,5 +1,4 @@
/****************************************************************************
**
** GeomIO Library
** Copyright FougSys (2 Mar. 2015)
** contact@fougsys.fr
@ -12,12 +11,12 @@
** 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
** "http://www.cecill.info".
**
****************************************************************************/
/* Warning : this header has no multi-inclusion guard. It must be included only once in the
* translation unit of use. The reason is that all functions defined here are meant to
* be inlined for performance purpose
/* WARNING :
* this header has no multi-inclusion guard. It must be included only once
* in the translation unit of use. The reason is that all functions
* defined here are meant to be inlined for performance purpose
*/
#include "../global.h"
@ -26,7 +25,8 @@
# include <stdlib.h>
#endif
/*! Returns \p val with the order of bytes reversed, uses compiler builtin functions if available */
/*! Returns \p val with the order of bytes reversed, uses compiler builtin
* functions if available */
GMIO_INLINE static uint16_t gmio_uint16_bswap(uint16_t val)
{
#ifdef GMIO_HAVE_GCC_BUILTIN_BSWAP16_FUNC
@ -38,7 +38,8 @@ GMIO_INLINE static uint16_t gmio_uint16_bswap(uint16_t val)
#endif
}
/*! Returns \p val with the order of bytes reversed, uses compiler builtin functions if available */
/*! Returns \p val with the order of bytes reversed, uses compiler builtin
* functions if available */
GMIO_INLINE static uint32_t gmio_uint32_bswap(uint32_t val)
{
#ifdef GMIO_HAVE_GCC_BUILTIN_BSWAP32_FUNC

View File

@ -1,5 +1,4 @@
/****************************************************************************
**
** GeomIO Library
** Copyright FougSys (2 Mar. 2015)
** contact@fougsys.fr
@ -12,7 +11,6 @@
** 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
** "http://www.cecill.info".
**
****************************************************************************/
#include "convert.h"

View File

@ -1,5 +1,4 @@
/****************************************************************************
**
** GeomIO Library
** Copyright FougSys (2 Mar. 2015)
** contact@fougsys.fr
@ -12,7 +11,6 @@
** 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
** "http://www.cecill.info".
**
****************************************************************************/
#ifndef GMIO_INTERNAL_CONVERT_H

View File

@ -1,5 +1,4 @@
/****************************************************************************
**
** GeomIO Library
** Copyright FougSys (2 Mar. 2015)
** contact@fougsys.fr
@ -12,7 +11,6 @@
** 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
** "http://www.cecill.info".
**
****************************************************************************/
#ifndef GMIO_INTERNAL_MIN_MAX_H

View File

@ -1,5 +1,4 @@
/****************************************************************************
**
** GeomIO Library
** Copyright FougSys (2 Mar. 2015)
** contact@fougsys.fr
@ -12,12 +11,12 @@
** 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
** "http://www.cecill.info".
**
****************************************************************************/
/* Warning : this header has no multi-inclusion guard. It must be included only once in the
* translation unit of use. The reason is that all functions defined here are meant to
* be inlined for performance purpose
/* WARNING :
* this header has no multi-inclusion guard. It must be included only once
* in the translation unit of use. The reason is that all functions
* defined here are meant to be inlined for performance purpose
*/
#include "../global.h"

View File

@ -1,5 +1,4 @@
/****************************************************************************
**
** GeomIO Library
** Copyright FougSys (2 Mar. 2015)
** contact@fougsys.fr
@ -12,7 +11,6 @@
** 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
** "http://www.cecill.info".
**
****************************************************************************/
#include "string_parse.h"

View File

@ -1,5 +1,4 @@
/****************************************************************************
**
** GeomIO Library
** Copyright FougSys (2 Mar. 2015)
** contact@fougsys.fr
@ -12,7 +11,6 @@
** 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
** "http://www.cecill.info".
**
****************************************************************************/
#ifndef GMIO_INTERNAL_STRING_PARSE_H
@ -47,7 +45,7 @@ char* gmio_current_char(const gmio_string_stream_fwd_iterator_t* it);
void gmio_skip_spaces(gmio_string_stream_fwd_iterator_t* it);
int gmio_eat_word(gmio_string_stream_fwd_iterator_t* it, gmio_string_buffer_t* buffer);
/*! \brief Converts the string pointed to by \p str to gmio_float32_t representation
/*! Converts the string pointed to by \p str to gmio_float32_t representation
*
* \retval 0 On success
* \retval -1 On error(check \c errno to see what happened)

View File

@ -1,5 +1,4 @@
/****************************************************************************
**
** GeomIO Library
** Copyright FougSys (2 Mar. 2015)
** contact@fougsys.fr
@ -12,7 +11,6 @@
** 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
** "http://www.cecill.info".
**
****************************************************************************/
#ifndef GMIO_MEMORY_H

View File

@ -1,5 +1,4 @@
/****************************************************************************
**
** GeomIO Library
** Copyright FougSys (2 Mar. 2015)
** contact@fougsys.fr
@ -12,7 +11,6 @@
** 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
** "http://www.cecill.info".
**
****************************************************************************/
#include "stream.h"

View File

@ -1,5 +1,4 @@
/****************************************************************************
**
** GeomIO Library
** Copyright FougSys (2 Mar. 2015)
** contact@fougsys.fr
@ -12,7 +11,6 @@
** 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
** "http://www.cecill.info".
**
****************************************************************************/
#ifndef GMIO_STREAM_H
@ -23,7 +21,7 @@
GMIO_C_LINKAGE_BEGIN
/*! \brief Stream that can get input from an arbitrary data source or can write
/*! Stream that can get input from an arbitrary data source or can write
* output to an arbitrary data sink.
*
* It can be seen as generalization of the standard \c FILE*, and is pretty
@ -31,17 +29,18 @@ GMIO_C_LINKAGE_BEGIN
* (http://www.gnu.org/software/libc/manual/html_mono/libc.html#Custom-Streams)
* in the GNU C Library
*
* It uses a cookie being basically an opaque pointer on a hidden data type.\n
* It uses a cookie being basically an opaque pointer on a hidden data type.
*
* The custom stream is implemented by defining hook functions that know how
* to read/write the data.
*/
struct gmio_stream
{
/*! \brief Opaque pointer on the user stream, passed as first argument to
/*! Opaque pointer on the user stream, passed as first argument to
* hook functions */
void* cookie;
/*! \brief Pointer on a function that checks end-of-stream indicator
/*! Pointer on a function that checks end-of-stream indicator
*
* Checks whether the end-of-stream indicator associated with stream
* pointed by \p cookie is set, returning GMIO_TRUE if is.
@ -51,21 +50,21 @@ struct gmio_stream
*/
gmio_bool_t (*at_end_func)(void* cookie);
/*! \brief Pointer on a function that checks error indicator
/*! Pointer on a function that checks error indicator
*
* Checks if the error indicator associated with stream pointed by \p cookie
* is set, returning a value different from zero if it is.
* Checks if the error indicator associated with stream pointed by
* \p cookie is set, returning a value different from zero if it is.
*
* The function should behaves like C standard [ferror()]
* (http://pubs.opengroup.org/onlinepubs/007904975/functions/ferror.html)
*/
int (*error_func)(void* cookie);
/*! \brief Pointer on a function that reads block of data from stream
/*! Pointer on a function that reads block of data from stream
*
* \details Reads an array of \p count elements, each one with a size of \p size
* bytes, from the stream pointed by \p cookie and stores them in the block
* of memory specified by \p ptr
* Reads an array of \p count elements, each one with a size of
* \p size bytes, from the stream pointed by \p cookie and stores them in
* the block of memory specified by \p ptr
*
* The function should behaves like C standard [fread()]
* (http://pubs.opengroup.org/onlinepubs/007904975/functions/fread.html)
@ -74,11 +73,11 @@ struct gmio_stream
*/
size_t (*read_func)(void* cookie, void* ptr, size_t size, size_t count);
/*! \brief Pointer on a function that writes block of data to stream
/*! Pointer on a function that writes block of data to stream
*
* \details Writes an array of \p count elements, each one with a size of \p size
* bytes, from the block of memory pointed by \p ptr to the current position
* in the stream pointed by \p cookie
* Writes an array of \p count elements, each one with a size of
* \p size bytes, from the block of memory pointed by \p ptr to the current
* position in the stream pointed by \p cookie
*
* The function should behaves like C standard [fwrite()]
* (http://pubs.opengroup.org/onlinepubs/007904975/functions/fwrite.html)
@ -92,27 +91,27 @@ typedef struct gmio_stream gmio_stream_t;
/* Initialization */
/*! \brief Installs a null stream */
/*! Installs a null stream */
GMIO_LIB_EXPORT void gmio_stream_set_null(gmio_stream_t* stream);
/*! \brief Configures \p stream for standard FILE* (cookie will hold \p file) */
/*! Configures \p stream for standard FILE* (cookie will hold \p file) */
GMIO_LIB_EXPORT void gmio_stream_set_stdio(gmio_stream_t* stream, FILE* file);
/* Services */
/*! \brief Safe and convenient function for gmio_stream::at_end_func()
/*! Safe and convenient function for gmio_stream::at_end_func()
*
* Same as: \code stream->at_end_func(stream->cookie) \endcode
*/
GMIO_LIB_EXPORT gmio_bool_t gmio_stream_at_end(gmio_stream_t* stream);
/*! \brief Safe and convenient function for gmio_stream::error_func()
/*! Safe and convenient function for gmio_stream::error_func()
*
* Same as: \code stream->error_func(stream->cookie) \endcode
*/
GMIO_LIB_EXPORT int gmio_stream_error(gmio_stream_t* stream);
/*! \brief Safe and convenient function for gmio_stream::read_func()
/*! Safe and convenient function for gmio_stream::read_func()
*
* Same as: \code stream->read_func(stream->cookie) \endcode
*/
@ -121,7 +120,7 @@ GMIO_LIB_EXPORT size_t gmio_stream_read(gmio_stream_t* stream,
size_t size,
size_t count);
/*! \brief Safe and convenient function for gmio_stream::write_func()
/*! Safe and convenient function for gmio_stream::write_func()
*
* Same as: \code stream->write_func(stream->cookie) \endcode
*/

View File

@ -1,5 +1,4 @@
/****************************************************************************
**
** GeomIO Library
** Copyright FougSys (2 Mar. 2015)
** contact@fougsys.fr
@ -12,7 +11,6 @@
** 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
** "http://www.cecill.info".
**
****************************************************************************/
#include "task_control.h"

View File

@ -1,5 +1,4 @@
/****************************************************************************
**
** GeomIO Library
** Copyright FougSys (2 Mar. 2015)
** contact@fougsys.fr
@ -12,7 +11,6 @@
** 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
** "http://www.cecill.info".
**
****************************************************************************/
#ifndef GMIO_TASK_CONTROL_H
@ -28,13 +26,14 @@ GMIO_C_LINKAGE_BEGIN
*/
struct gmio_task_control
{
/*! Opaque pointer on a user task object, passed as first argument to hook functions */
/*! Opaque pointer on a user task object, passed as first argument to hook
* functions */
void* cookie;
/*! \brief Pointer on a function that says if the current task must stop
/*! Pointer on a function that says if the current task must stop
*
* If GMIO_TRUE is returned then the current task should abort as soon as possible, otherwise it
* can continue execution.
* If GMIO_TRUE is returned then the current task should abort as soon as
* possible, otherwise it can continue execution.
*/
gmio_bool_t (*is_stop_requested_func)(void* cookie);
};

View File

@ -1,5 +1,4 @@
/****************************************************************************
**
** GeomIO Library
** Copyright FougSys (2 Mar. 2015)
** contact@fougsys.fr
@ -12,7 +11,6 @@
** 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
** "http://www.cecill.info".
**
****************************************************************************/
#ifndef GMIO_TRANSFER_H

View File

@ -1,5 +1,4 @@
/****************************************************************************
**
** GeomIO Library
** Copyright FougSys (2 Mar. 2015)
** contact@fougsys.fr
@ -12,7 +11,6 @@
** 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
** "http://www.cecill.info".
**
****************************************************************************/
#include "stl_rw_common.h"

View File

@ -1,5 +1,4 @@
/****************************************************************************
**
** GeomIO Library
** Copyright FougSys (2 Mar. 2015)
** contact@fougsys.fr
@ -12,7 +11,6 @@
** 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
** "http://www.cecill.info".
**
****************************************************************************/
#ifndef GMIO_INTERNAL_STL_RW_COMMON_H

View File

@ -1,5 +1,4 @@
/****************************************************************************
**
** GeomIO Library
** Copyright FougSys (2 Mar. 2015)
** contact@fougsys.fr
@ -12,7 +11,6 @@
** 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
** "http://www.cecill.info".
**
****************************************************************************/
#include "stlb_byte_swap.h"

View File

@ -1,5 +1,4 @@
/****************************************************************************
**
** GeomIO Library
** Copyright FougSys (2 Mar. 2015)
** contact@fougsys.fr
@ -12,7 +11,6 @@
** 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
** "http://www.cecill.info".
**
****************************************************************************/
#ifndef GMIO_INTERNAL_STLB_BYTE_SWAP_H

View File

@ -1,5 +1,4 @@
/****************************************************************************
**
** GeomIO Library
** Copyright FougSys (2 Mar. 2015)
** contact@fougsys.fr
@ -12,7 +11,6 @@
** 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
** "http://www.cecill.info".
**
****************************************************************************/
#ifndef GMIO_LIBSTL_STL_ERROR_H
@ -21,23 +19,29 @@
/*! 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 */
/*! This enum defines the various error codes reported by STL read/write
* functions */
enum gmio_stl_error
{
/*! Common STL write error indicating gmio_stl_mesh::get_triangle_func() pointer is NULL */
/*! Common STL write error indicating gmio_stl_mesh::get_triangle_func()
* pointer is NULL
*/
GMIO_STL_WRITE_NULL_GET_TRIANGLE_FUNC_ERROR = GMIO_STL_ERROR_TAG + 1,
/* Specific error codes returned by STL_ascii read function */
/*! Parsing error occured in gmio_stla_read() due to malformed STL ascii input */
/*! Parsing error occured in gmio_stla_read() due to malformed STL ascii
* input */
GMIO_STLA_READ_PARSE_ERROR = GMIO_STL_ERROR_TAG + 100,
/*! Invalid max number of decimal significants digits for gmio_stla_write(), must be in [1..9] */
/*! Invalid max number of decimal significants digits for
* gmio_stla_write(), must be in [1..9] */
GMIO_STLA_WRITE_INVALID_REAL32_PREC_ERROR = GMIO_STL_ERROR_TAG + 101,
/* Specific error codes returned by STL_binary read/write functions */
/*! The byte order argument supplied is not supported, must be little or big endian */
/*! The byte order argument supplied is not supported, must be little or
* big endian */
GMIO_STLB_UNSUPPORTED_BYTE_ORDER_ERROR = GMIO_STL_ERROR_TAG + 300,
/*! Error occured when reading header data in gmio_stlb_read() */

View File

@ -1,5 +1,4 @@
/****************************************************************************
**
** GeomIO Library
** Copyright FougSys (2 Mar. 2015)
** contact@fougsys.fr
@ -12,7 +11,6 @@
** 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
** "http://www.cecill.info".
**
****************************************************************************/
#include "stl_format.h"

View File

@ -1,5 +1,4 @@
/****************************************************************************
**
** GeomIO Library
** Copyright FougSys (2 Mar. 2015)
** contact@fougsys.fr
@ -12,7 +11,6 @@
** 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
** "http://www.cecill.info".
**
****************************************************************************/
#ifndef GMIO_LIBSTL_FORMAT_H
@ -34,7 +32,7 @@ enum gmio_stl_format
typedef enum gmio_stl_format gmio_stl_format_t;
/*! \brief Returns the format of the STL data in \p stream
/*! Returns the format of the STL data in \p stream
*
* It will try to read 512 bytes from \p stream into a buffer and then
* analyses this data to guess the format.
@ -43,7 +41,7 @@ typedef enum gmio_stl_format gmio_stl_format_t;
* stream data (e.g. file size), it is required to guess endianness in case
* of binary format.
*
* Returns GMIO_STL_UNKNOWN_FORMAT in case of error.
* \retval GMIO_STL_UNKNOWN_FORMAT in case of error.
*/
GMIO_LIBSTL_EXPORT
gmio_stl_format_t gmio_stl_get_format(gmio_stream_t* stream, size_t data_size);

View File

@ -1,5 +1,4 @@
/****************************************************************************
**
** GeomIO Library
** Copyright FougSys (2 Mar. 2015)
** contact@fougsys.fr
@ -12,7 +11,6 @@
** 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
** "http://www.cecill.info".
**
****************************************************************************/
#ifndef GMIO_LIBSTL_GLOBAL_H

View File

@ -1,5 +1,4 @@
/****************************************************************************
**
** GeomIO Library
** Copyright FougSys (2 Mar. 2015)
** contact@fougsys.fr
@ -12,7 +11,6 @@
** 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
** "http://www.cecill.info".
**
****************************************************************************/
#ifndef GMIO_LIBSTL_STL_IO_H
@ -26,12 +24,11 @@
GMIO_C_LINKAGE_BEGIN
/* ============================================================================
/* ========================================================================
* STL ascii
* ============================================================================
*/
* ======================================================================== */
/*! \brief Options for gmio_stla_read()
/*! Options for gmio_stla_read()
*
* No options yet, it just exists for future needs, which could possibly be:
* - flag to force locale ?
@ -43,7 +40,7 @@ struct gmio_stla_read_options
};
typedef struct gmio_stla_read_options gmio_stla_read_options_t;
/*! \brief Read geometry from STL ascii stream
/*! Reads geometry from STL ascii stream
*
* \p options should be always set to NULL (not used for the moment)
*/
@ -52,8 +49,7 @@ int gmio_stla_read(gmio_stl_mesh_creator_t* creator,
gmio_transfer_t* trsf,
const gmio_stla_read_options_t* options /* NULL */);
/*! \brief Options for gmio_stla_write()
*/
/*! Options for gmio_stla_write() */
struct gmio_stla_write_options
{
/*! May be NULL to generate default name */
@ -64,7 +60,7 @@ struct gmio_stla_write_options
};
typedef struct gmio_stla_write_options gmio_stla_write_options_t;
/*! \brief Write geometry in the STL ascii format
/*! Writes geometry in the STL ascii format
*
* \param mesh Defines the mesh to write
* \param trsf Defines needed objects (stream, buffer, ...) for the writing
@ -80,13 +76,11 @@ int gmio_stla_write(const gmio_stl_mesh_t* mesh,
gmio_transfer_t* trsf,
const gmio_stla_write_options_t* options);
/* ============================================================================
/* ========================================================================
* STL binary
* ============================================================================
*/
* ======================================================================== */
/*! \brief Options for gmio_stlb_read()
*/
/*! Options for gmio_stlb_read() */
struct gmio_stlb_read_options
{
/*! Set to host byte order if not specified (ie. options == NULL) */
@ -94,16 +88,14 @@ struct gmio_stlb_read_options
};
typedef struct gmio_stlb_read_options gmio_stlb_read_options_t;
/*! \brief Read geometry from STL binary stream
*/
/*! Reads geometry from STL binary stream */
GMIO_LIBSTL_EXPORT
int gmio_stlb_read(gmio_stl_mesh_creator_t* creator,
gmio_transfer_t* trsf,
const gmio_stlb_read_options_t* options);
/*! \brief Options for gmio_stlb_write()
*/
/*! Options for gmio_stlb_write() */
struct gmio_stlb_write_options
{
/*! Header data consisting of 80 bytes */
@ -114,8 +106,7 @@ struct gmio_stlb_write_options
};
typedef struct gmio_stlb_write_options gmio_stlb_write_options_t;
/*! \brief Write geometry in the STL binary format
*/
/*! Writes geometry in the STL binary format */
GMIO_LIBSTL_EXPORT
int gmio_stlb_write(const gmio_stl_mesh_t* mesh,
gmio_transfer_t* trsf,

View File

@ -1,5 +1,4 @@
/****************************************************************************
**
** GeomIO Library
** Copyright FougSys (2 Mar. 2015)
** contact@fougsys.fr
@ -12,7 +11,6 @@
** 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
** "http://www.cecill.info".
**
****************************************************************************/
#ifndef GMIO_LIBSTL_STL_MESH_H
@ -24,14 +22,18 @@
/*! Provides an interface for accessing the underlying(hidden) user mesh */
struct gmio_stl_mesh
{
/*! Opaque pointer on the user mesh, passed as first argument to hook functions */
/*! Opaque pointer on the user mesh, passed as first argument to hook
* functions */
const void* cookie;
/*! Number of triangles in the mesh */
uint32_t triangle_count;
/*! Pointer on a function that stores the mesh triangle of index \p tri_id into \p triangle */
void (*get_triangle_func)(const void* cookie, uint32_t tri_id, gmio_stl_triangle_t* triangle);
/*! Pointer on a function that stores the mesh triangle of index \p tri_id
* into \p triangle */
void (*get_triangle_func)(const void* cookie,
uint32_t tri_id,
gmio_stl_triangle_t* triangle);
};
typedef struct gmio_stl_mesh gmio_stl_mesh_t;

View File

@ -1,5 +1,4 @@
/****************************************************************************
**
** GeomIO Library
** Copyright FougSys (2 Mar. 2015)
** contact@fougsys.fr
@ -12,7 +11,6 @@
** 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
** "http://www.cecill.info".
**
****************************************************************************/
#ifndef GMIO_LIBSTL_STL_MESH_CREATOR_H
@ -21,44 +19,46 @@
#include "stl_global.h"
#include "stl_triangle.h"
/*! \brief Provides an interface for the creation of the underlying(hidden)
* user mesh
*/
/*! Provides an interface for the creation of the underlying(hidden)
* user mesh */
struct gmio_stl_mesh_creator
{
/*! \brief Opaque pointer on the user mesh, passed as first argument to hook
* functions
*/
/*! Opaque pointer on the user mesh, passed as first argument to hook
* functions */
void* cookie;
/* All function pointers are optional (ie can be set to NULL) */
/*! \brief Pointer on a function that handles declaration of a solid of name
* \p solid_name
/*! Pointer on a function that handles declaration of a solid of
* name \p solid_name
*
* Optional function useful only with STL ascii (ie. gmio_stla_read())
*/
void (*ascii_begin_solid_func)(void* cookie, const char* solid_name);
/*! \brief Pointer on a function that handles declaration of a mesh with
/*! Pointer on a function that handles declaration of a mesh with
* \p tri_count number of triangles
*
* Optional function useful only with STL binary (ie. gmio_stlb_read()).
*
* The argument \p header contains the header data(80 bytes)
*/
void (*binary_begin_solid_func)(void* cookie, uint32_t tri_count, const uint8_t* header);
void (*binary_begin_solid_func)(void* cookie,
uint32_t tri_count,
const uint8_t* header);
/*! \brief Pointer on a function that adds a triangle to the user mesh
/*! Pointer on a function that adds a triangle to the user mesh
*
* The argument \p triangle is the triangle to be added, note that
* gmio_stl_triangle_t::attribute_byte_count is meaningless for STL ascii.
*
* The argument \p tri_id is the index of the mesh triangle
*/
void (*add_triangle_func)(void* cookie, uint32_t tri_id, const gmio_stl_triangle_t* triangle);
void (*add_triangle_func)(void* cookie,
uint32_t tri_id,
const gmio_stl_triangle_t* triangle);
/*! \brief Pointer on a function that finalizes creation of the user mesh
/*! Pointer on a function that finalizes creation of the user mesh
*
* Optional function called at the end of the read process, ie. after all
* triangles have been added

View File

@ -1,5 +1,4 @@
/****************************************************************************
**
** GeomIO Library
** Copyright FougSys (2 Mar. 2015)
** contact@fougsys.fr
@ -12,7 +11,6 @@
** 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
** "http://www.cecill.info".
**
****************************************************************************/
#ifndef GMIO_LIBSTL_TRIANGLE_H
@ -20,9 +18,8 @@
#include "stl_global.h"
/*! \brief Cartesian coordinate entity in 3D space, specifically tailored for
* STL needs (single-float)
*/
/*! Cartesian coordinate entity in 3D space, specifically tailored for
* STL needs (single-float) */
struct gmio_stl_coords
{
gmio_float32_t x;
@ -32,9 +29,8 @@ struct gmio_stl_coords
typedef struct gmio_stl_coords gmio_stl_coords_t;
/*! \brief STL mesh triangle defined three geometric vertices and an
* orientation(normal)
*/
/*! STL mesh triangle defined three geometric vertices and an
* orientation(normal) */
struct gmio_stl_triangle
{
gmio_stl_coords_t normal;