Main Page Class Hierarchy Compound List File List Compound Members File Members

# filehd.h

Go to the documentation of this file.

    00001
    00002
    00003 //
    00004 //      FILEHD.H                                        (c)     YoY'00                                          WEB: www.aestesis.org
    00005 //
    00008 #ifndef                                                 _FILEHD_H_
    00009 #define                                                 _FILEHD_H_
    00012 #include                                                <stdio.h>
    00013 #include                                                "types.h"
    00014 #include                                                "file.h"
    00017
    00018 //      If you use directly the variables in the class API, it's at your own risks. Prefer the methods...
    00019
    00022
    00023 #define                                                 guidFILEHD                                              (Afilehd::CI.guid)
    00024
    00027
    00028 class Afilehd : public Afile
    00029 {
    00030 public:
    00031         enum
    00032         {
    00033                                                                 READ=1,
    00034                                                                 WRITE=2
    00035         };
    00036
    00037         ALIBOBJ
    00038
    00039         ADLL                                            Afilehd                                                 (char *name, int type=READ);
    00040         ADLL virtual                            ~Afilehd                                                ();
    00041
    00042         ADLL virtual int                        read                                                    (void *p, int s);
    00043         ADLL virtual int                        write                                                   (void *p, int s);
    00044
    00045         ADLL virtual bool                       writeString                                             (char *s);
    00046         ADLL virtual bool                       readString                                              (char *s);
    00047
    00048         ADLL virtual bool                       seek                                                    (int n);
    00049         ADLL virtual int                        getSize                                                 ();
    00050
    00051         virtual bool                            isOK                                                    ()                                              { return f!=NULL; }
    00052
    00053         // private
    00054
    00055         FILE                                            *f;
    00056 };
    00057
    00060 #endif                                                  //_FILE_H_