source: trunk/tools/common/kFileFormatBase.cpp@ 8003

Last change on this file since 8003 was 8003, checked in by bird, 24 years ago

New kFile* classes; now in sync with os2tools.

File size: 1.5 KB
Line 
1/* $Id: kFileFormatBase.cpp,v 1.6 2002-02-24 02:47:25 bird Exp $
2 *
3 * kFileFormatBase - Base class for kFile<format> classes.
4 *
5 * Copyright (c) 1999-2001 knut st. osmundsen (knut.stange.osmundsen@mynd.no)
6 *
7 * Project Odin Software License can be found in LICENSE.TXT
8 *
9 */
10
11
12
13/*******************************************************************************
14* Header Files *
15*******************************************************************************/
16#include "kTypes.h"
17#include "kError.h"
18#include "kFile.h"
19#include "kFileInterfaces.h"
20#include "kFileFormatBase.h"
21
22
23
24/**
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)
31 */
32kFileFormatBase::kFileFormatBase(kFile *pFile)
33 : pFile(pFile)
34{
35}
36
37
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 */
44kFileFormatBase::~kFileFormatBase()
45{
46 if (pFile)
47 delete pFile;
48 pFile = NULL;
49}
50
51
52/**
53 * Dump function.
54 * @returns Successindicator.
55 * @param pOut Output file.
56 */
57KBOOL kFileFormatBase::dump(kFile *pOut)
58{
59 pOut->printf("Sorry, dump() is not implemented for this file format.\n");
60 return FALSE;
61}
62
Note: See TracBrowser for help on using the repository browser.