Rev | Line | |
---|
[8003] | 1 | /* $Id: kFileFormatBase.cpp,v 1.6 2002-02-24 02:47:25 bird Exp $
|
---|
[3246] | 2 | *
|
---|
| 3 | * kFileFormatBase - Base class for kFile<format> classes.
|
---|
| 4 | *
|
---|
[8003] | 5 | * Copyright (c) 1999-2001 knut st. osmundsen (knut.stange.osmundsen@mynd.no)
|
---|
[3246] | 6 | *
|
---|
| 7 | * Project Odin Software License can be found in LICENSE.TXT
|
---|
| 8 | *
|
---|
| 9 | */
|
---|
| 10 |
|
---|
| 11 |
|
---|
| 12 |
|
---|
| 13 | /*******************************************************************************
|
---|
| 14 | * Header Files *
|
---|
| 15 | *******************************************************************************/
|
---|
[8003] | 16 | #include "kTypes.h"
|
---|
| 17 | #include "kError.h"
|
---|
[5053] | 18 | #include "kFile.h"
|
---|
[8003] | 19 | #include "kFileInterfaces.h"
|
---|
[3246] | 20 | #include "kFileFormatBase.h"
|
---|
| 21 |
|
---|
| 22 |
|
---|
[8003] | 23 |
|
---|
[3246] | 24 | /**
|
---|
[8003] | 25 | * Constructor.
|
---|
| 26 | * Saves the file object pointer.
|
---|
| 27 | * @param pFile This will be deleted if the object is
|
---|
| 28 | * successfully constructed (by the destructor).
|
---|
| 29 | * @status completely implemented.
|
---|
| 30 | * @author knut st. osmundsen (knut.stange.osmundsen@mynd.no)
|
---|
[4358] | 31 | */
|
---|
[21916] | 32 | kFileFormatBase::kFileFormatBase(kFile *pFile) throw (kError)
|
---|
[8003] | 33 | : pFile(pFile)
|
---|
[4358] | 34 | {
|
---|
| 35 | }
|
---|
| 36 |
|
---|
[6066] | 37 |
|
---|
[8003] | 38 | /**
|
---|
| 39 | * Destructor.
|
---|
| 40 | * Deletes the file object if it exists.
|
---|
| 41 | * @status completely implemented.
|
---|
| 42 | * @author knut st. osmundsen (knut.stange.osmundsen@mynd.no)
|
---|
| 43 | */
|
---|
[21916] | 44 | kFileFormatBase::~kFileFormatBase() throw (kError)
|
---|
[6066] | 45 | {
|
---|
[8003] | 46 | if (pFile)
|
---|
| 47 | delete pFile;
|
---|
| 48 | pFile = NULL;
|
---|
| 49 | }
|
---|
[6066] | 50 |
|
---|
[8003] | 51 |
|
---|
| 52 | /**
|
---|
| 53 | * Dump function.
|
---|
| 54 | * @returns Successindicator.
|
---|
| 55 | * @param pOut Output file.
|
---|
| 56 | */
|
---|
| 57 | KBOOL kFileFormatBase::dump(kFile *pOut)
|
---|
| 58 | {
|
---|
| 59 | pOut->printf("Sorry, dump() is not implemented for this file format.\n");
|
---|
| 60 | return FALSE;
|
---|
[6066] | 61 | }
|
---|
| 62 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.