Main Page Namespace List Compound List File List Namespace Members Compound Members

# iFile.h

Go to the documentation of this file.

    00001
    00005 /*
    00006    © Copyright 2005-2006,
    00007    National Instruments Corporation.
    00008    All rights reserved.
    00009
    00010    File:        iFile.h
    00011    Originated:  12 May 2005
    00012 */
    00013
    00014 #ifndef ___fantom_iFile_h___
    00015 #define ___fantom_iFile_h___
    00016
    00017 // includes...
    00018
    00019 #ifndef ___fantom_platform_h___
    00020    #include "platform.h"
    00021 #endif
    00022
    00023 #ifndef ___fantom_tStatus_h___
    00024    #include "tStatus.h"
    00025 #endif
    00026
    00027
    00028 // defines...
    00029
    00030
    00031 namespace nFANTOM100
    00032 {
    00033    // forward declarations...
    00034
    00035    // typedefs...
    00036
    00037    // classes...
    00038
    00043    class iFile
    00044    {
    00045       friend class tNXT;
    00046
    00047       // methods
    00048       protected:
    00049
    00051          virtual ~iFile() = 0;
    00052
    00053       public:
    00054
    00056
    00061          virtual void getName( ViChar fileName[] ) const = 0;
    00062
    00064
    00070          virtual ViUInt32 getSize( tStatus& status ) = 0;
    00071
    00073
    00081          virtual ViUInt32 getAvailableSize( tStatus& status ) = 0;
    00082
    00083
    00085
    00091          virtual void openForRead( tStatus& status ) = 0;
    00092
    00093
    00095
    00104          virtual void openForWrite( ViUInt32 sizeInBytes, tStatus& status ) = 0;
    00105
    00106
    00108
    00117          virtual void openForLinearWrite( ViUInt32 sizeInBytes, tStatus& status ) = 0;
    00118
    00119
    00121
    00131          virtual void openForDataWrite( ViUInt32 sizeInBytes, tStatus& status ) = 0;
    00132
    00133
    00135
    00144          virtual void openForDataAppend( tStatus& status ) = 0;
    00145
    00146
    00148
    00154          virtual void close( tStatus& status ) = 0;
    00155
    00156
    00158
    00173          virtual ViUInt32 read( ViPBuf bufferPtr, ViUInt32 numberOfBytes, tStatus& status ) = 0;
    00174
    00175
    00177
    00192          virtual ViUInt32 write( const ViByte bufferPtr[], ViUInt32 numberOfBytes,
    00193                tStatus& status ) = 0;
    00194
    00195
    00197
    00203          virtual void remove( tStatus& status ) = 0;
    00204
    00205    };
    00206
    00207
    00208    // constants...
    00209    const ViUInt8 kProtocolFilenameLength = 19;   // 15 basename + 1 dot + 3 extension = 19
    00210
    00211 } // namespace nFANTOM100
    00212
    00213
    00214    // declarations for globally-scoped globals...
    00215
    00216    // typedefs...
    00217    typedef ViObject nFANTOM100_iFile;
    00218
    00219    // prototypes...
    00220    extern "C"
    00221    {
    00222       nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iFile_getName(
    00223             nFANTOM100_iFile filePtr,
    00224             ViChar fileName[],
    00225             ViStatus* status );
    00226
    00227       nFANTOM100_kExport ViUInt32 _VI_FUNCC nFANTOM100_iFile_getSize(
    00228             nFANTOM100_iFile filePtr,
    00229             ViStatus* status );
    00230
    00231       nFANTOM100_kExport ViUInt32 _VI_FUNCC nFANTOM100_iFile_getAvailableSize(
    00232             nFANTOM100_iFile filePtr,
    00233             ViStatus* status );
    00234
    00235       nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iFile_openForRead(
    00236             nFANTOM100_iFile filePtr,
    00237             ViStatus* status );
    00238
    00239       nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iFile_openForWrite(
    00240             nFANTOM100_iFile filePtr,
    00241             ViUInt32 sizeInBytes,
    00242             ViStatus* status );
    00243
    00244       nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iFile_openForLinearWrite(
    00245             nFANTOM100_iFile filePtr,
    00246             ViUInt32 sizeInBytes,
    00247             ViStatus* status );
    00248
    00249       nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iFile_openForDataWrite(
    00250             nFANTOM100_iFile filePtr,
    00251             ViUInt32 sizeInBytes,
    00252             ViStatus* status );
    00253
    00254       nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iFile_openForDataAppend(
    00255             nFANTOM100_iFile filePtr,
    00256             ViStatus* status );
    00257
    00258       nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iFile_close(
    00259             nFANTOM100_iFile filePtr,
    00260             ViStatus* status );
    00261
    00262       nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iFile_read(
    00263             nFANTOM100_iFile filePtr,
    00264             ViPBuf bufferPtr,
    00265             ViUInt32 numberOfBytes,
    00266             ViStatus* status );
    00267
    00268       nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iFile_write(
    00269             nFANTOM100_iFile filePtr,
    00270             const ViByte bufferPtr[],
    00271             ViUInt32 numberOfBytes,
    00272             ViStatus* status );
    00273
    00274       nFANTOM100_kExport void _VI_FUNCC nFANTOM100_iFile_remove(
    00275             nFANTOM100_iFile filePtr,
    00276             ViStatus* status );
    00277
    00278    }
    00279
    00280 #endif // ___fantom_iFile_h___

© Copyright 2005-2006, National Instruments Corporation. All rights reserved.