#
libsff

Home | Modules | Examples

# /home/pinky2/mattijs/OpenFOAM/OpenFOAM-1.0/applications/utilities/mesh/conversion/ccm24ToFoam/libccmio/libccmio/ccmioutility.h

Go to the documentation of this file.

    00001 #ifndef CCMIO_UTILITY_H
    00002 #define CCMIO_UTILITY_H
    00003
    00004 /*@@
    00005  *  Program: Star File Format Library  - $RCSfile: ccmioutility.h,v $
    00006  *  Author:  Geoff Prewett
    00007  *  Date:    August 28, 2003
    00008  *
    00009  *
    00010  *  Star File Format Library - Copyright (C) 2003 by adapco, Ltd.
    00011  *
    00012  *  This program is the property of adapco, Ltd. and contains
    00013  *  confidential and proprietary information.  The unauthorized use,
    00014  *  distribution, or duplication of this program is prohibited.
    00015  *  All rights reserved.
    00016  *
    00017  *  $Id: ccmioutility.h,v 1.3 2004/07/07 20:13:50 prewett Exp $
    00018  */
    00019
    00020 #ifdef __cplusplus
    00021 extern "C" {
    00022 #endif
    00023
    00024 #include "ccmiotypes.h"
    00025
    00026 /* \{
    00027    \name Utility functions
    00028    \brief Condenses common tasks
    00029    \ingroup core */
    00030
    00032 extern CCMIOError CCMIOWriteNodei( CCMIOError *err, CCMIONode parent,
    00033                                    const char *name, int value );
    00034
    00036 extern CCMIOError CCMIOWriteNodef( CCMIOError *err, CCMIONode parent,
    00037                                    const char *name, float value );
    00038
    00040 extern CCMIOError CCMIOWriteNoded( CCMIOError *err, CCMIONode parent,
    00041                                    const char *name, double value );
    00042
    00044 extern CCMIOError CCMIOWriteNodestr( CCMIOError *err, CCMIONode parent,
    00045                                      const char *name, const char *value );
    00046
    00049 extern CCMIOError CCMIOReadNodei( CCMIOError *err, CCMIONode parent,
    00050                                   const char *name, int *value );
    00051
    00054 extern CCMIOError CCMIOReadNodef( CCMIOError *err, CCMIONode parent,
    00055                                   const char *name, float *value );
    00056
    00059 extern CCMIOError CCMIOReadNoded( CCMIOError *err, CCMIONode parent,
    00060                                   const char *name, double *value );
    00061
    00065 extern CCMIOError CCMIOReadNodestr( CCMIOError *err, CCMIONode parent,
    00066                                     const char *name, char **value );
    00067
    00068 /* CCMIORead*() and CCMIOWrite*() are actually included in ccmio.c, in order
    00069    to limit the amount of fake templating. */
    00070
    00078 extern CCMIOError CCMIORead1i( CCMIOError *err, CCMIONode node, int *data,
    00079                                unsigned int start, unsigned int end );
    00080 extern CCMIOError CCMIORead1f( CCMIOError *err, CCMIONode node, float *data,
    00081                                unsigned int start, unsigned int end );
    00082 extern CCMIOError CCMIORead1d( CCMIOError *err, CCMIONode node, double *data,
    00083                                unsigned int start, unsigned int end );
    00084 extern CCMIOError CCMIORead2i( CCMIOError *err, CCMIONode node, int *data,
    00085                                unsigned int start, unsigned int end );
    00086 extern CCMIOError CCMIORead2f( CCMIOError *err, CCMIONode node, float *data,
    00087                                unsigned int start, unsigned int end );
    00088 extern CCMIOError CCMIORead2d( CCMIOError *err, CCMIONode node, double *data,
    00089                                unsigned int start, unsigned int end );
    00090 extern CCMIOError CCMIORead3i( CCMIOError *err, CCMIONode node, int *data,
    00091                                unsigned int start, unsigned int end );
    00092 extern CCMIOError CCMIORead3f( CCMIOError *err, CCMIONode node, float *data,
    00093                                unsigned int start, unsigned int end );
    00094 extern CCMIOError CCMIORead3d( CCMIOError *err, CCMIONode node, double *data,
    00095                                unsigned int start, unsigned int end );
    00096
    00100 extern CCMIOError CCMIOWrite1i( CCMIOError *err, CCMIONode node, int n,
    00101                                 const int *data, unsigned int start,
    00102                                 unsigned int end );
    00103 extern CCMIOError CCMIOWrite1f( CCMIOError *err, CCMIONode node, int n,
    00104                                 const float *data, unsigned int start,
    00105                                 unsigned int end );
    00106 extern CCMIOError CCMIOWrite1d( CCMIOError *err, CCMIONode node, int n,
    00107                                 const double *data, unsigned int start,
    00108                                 unsigned int end );
    00109 extern CCMIOError CCMIOWrite2i( CCMIOError *err, CCMIONode node,
    00110                                 int x, int y, const int *data,
    00111                                 unsigned int start, unsigned int end );
    00112 extern CCMIOError CCMIOWrite2f( CCMIOError *err, CCMIONode node,
    00113                                 int x, int y, const float *data,
    00114                                 unsigned int start, unsigned int end );
    00115 extern CCMIOError CCMIOWrite2d( CCMIOError *err, CCMIONode node,
    00116                                 int x, int y, const double *data,
    00117                                 unsigned int start, unsigned int end );
    00118 extern CCMIOError CCMIOWrite3i( CCMIOError *err, CCMIONode node,
    00119                                 int x, int y, int z, const int *data,
    00120                                 unsigned int start, unsigned int end );
    00121 extern CCMIOError CCMIOWrite3f( CCMIOError *err, CCMIONode node,
    00122                                 int x, int y, int z, const float *data,
    00123                                 unsigned int start, unsigned int end );
    00124 extern CCMIOError CCMIOWrite3d( CCMIOError *err, CCMIONode node,
    00125                                 int x, int y, int z, const double *data,
    00126                                 unsigned int start, unsigned int end );
    00127
    00129 CCMIOError CCMIOOldReadf( CCMIOError *err, CCMIONode node, int dimension,
    00130                           int swapDims, float *data, unsigned int start,
    00131                           unsigned int end );
    00133 CCMIOError CCMIOOldReadd( CCMIOError *err, CCMIONode node, int dimension,
    00134                           int swapDims, double *data, unsigned int start,
    00135                           unsigned int end );
    00137 CCMIOError CCMIOOldReadi( CCMIOError *err, CCMIONode node, int dimension,
    00138                           int swapDims, int *data, unsigned int start,
    00139                           unsigned int end );
    00140
    00149 extern CCMIOError CCMIOCopyNode( CCMIOError *err, CCMIONode origNode,
    00150                                  CCMIONode copyNode, int copyExists );
    00153 extern CCMIOError CCMIOGetNextChildWithLabel( CCMIOError *err, CCMIONode parent,
    00154                                               const char *label, int *n,
    00155                                               CCMIONode *child );
    00156
    00167 CCMIOError CCMIOCompress( CCMIOError *err, char *filename );
    00168
    00169 /* \} */
    00170 #ifdef __cplusplus
    00171 }
    00172 #endif
    00173 #endif /* CCMIO_UTILITY_H */