Ignore:
Timestamp:
Feb 24, 2002, 3:47:28 AM (24 years ago)
Author:
bird
Message:

New kFile* classes; now in sync with os2tools.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/common/kFileFormatBase.cpp

    r6066 r8003  
    1 /* $Id: kFileFormatBase.cpp,v 1.5 2001-06-22 17:07:47 bird Exp $
     1/* $Id: kFileFormatBase.cpp,v 1.6 2002-02-24 02:47:25 bird Exp $
    22 *
    33 * kFileFormatBase - Base class for kFile<format> classes.
    44 *
    5  * Copyright (c) 1999-2000 knut st. osmundsen (knut.stange.osmundsen@pmsc.no)
     5 * Copyright (c) 1999-2001 knut st. osmundsen (knut.stange.osmundsen@mynd.no)
    66 *
    77 * Project Odin Software License can be found in LICENSE.TXT
     
    1414*   Header Files                                                               *
    1515*******************************************************************************/
    16 #include <os2.h>
     16#include "kTypes.h"
     17#include "kError.h"
     18#include "kFile.h"
     19#include "kFileInterfaces.h"
     20#include "kFileFormatBase.h"
    1721
    18 #include <malloc.h>
    19 #include <string.h>
    20 #include <stdio.h>
    2122
    22 #include "kFile.h"
    23 #include "kInterfaces.h"
    24 #include "kFileFormatBase.h"
     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}
    2550
    2651
     
    3055 * @param   pOut    Output file.
    3156 */
    32 BOOL   kFileFormatBase::dump(kFile *pOut)
     57KBOOL   kFileFormatBase::dump(kFile *pOut)
    3358{
    3459    pOut->printf("Sorry, dump() is not implemented for this file format.\n");
     
    3661}
    3762
    38 
    39 kFileFormatBase::~kFileFormatBase()
    40 {
    41 
    42 }
    43 
Note: See TracChangeset for help on using the changeset viewer.