home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-17 | 2.7 KB | 100 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWFilRep.cpp
- // Release Version: $ ODF 2 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #include "FWOS.hpp"
-
- #ifndef FWFILREP_H
- #include "FWFilRep.h"
- #endif
-
- #ifndef FWPRIDEB_H
- #include "FWPriDeb.h"
- #endif
-
- #ifndef FWEXCDEF_H
- #include "FWExcDef.h"
- #endif
-
- #ifdef FW_BUILD_MAC
- #pragma segment File
- #endif
-
- //========================================================================================
- // Template instantiation
- //========================================================================================
-
- #include "FWSOMPtr.tpp"
-
- FW_DEFINE_AUTO_TEMPLATE(FW_TCountedSOMPtr, FW_OFile)
-
- #if FW_USE_TEMPLATE_PRAGMAS
- #pragma template_access public
- #pragma template FW_TCountedSOMPtr<FW_OFile>
- #endif
-
- #if FW_ANSI_TEMPLATE_INSTANTIATION
- template class FW_TCountedSOMPtr<FW_OFile>;
- #endif
-
- //========================================================================================
- // CLASS FW_PFile
- //========================================================================================
-
- //----------------------------------------------------------------------------------------
- // FW_PFile::FW_PFile
- //----------------------------------------------------------------------------------------
-
- FW_PFile::FW_PFile(Environment* ev, FW_OFile* privFileAccessRep)
- {
- SetRep(ev, privFileAccessRep);
- }
-
- //----------------------------------------------------------------------------------------
- // FW_PFile::FW_PFile
- //----------------------------------------------------------------------------------------
-
- FW_PFile::FW_PFile(Environment* ev,
- FW_OFileSpecification* fileSpecification,
- FW_Boolean allowCreate)
- {
- FW_OFile* rep = new FW_OFile();
-
- SetRep(ev, rep);
- rep->InitWithExclusiveAccess(ev,
- fileSpecification,
- allowCreate);
- }
-
- //----------------------------------------------------------------------------------------
- // FW_PFile::FW_PFile
- //----------------------------------------------------------------------------------------
-
- FW_PFile::FW_PFile(Environment* ev,
- FW_OFileSpecification* fileSpecification,
- const FW_SAccessPermission& permission,
- FW_Boolean allowCreate)
- {
- FW_OFile* rep = new FW_OFile();
-
- SetRep(ev, rep);
- rep->InitWithPermissions(ev,
- fileSpecification,
- (FW_SAccessPermission *) &permission,
- allowCreate);
- }
-
- //----------------------------------------------------------------------------------------
- // FW_PFile::~FW_PFile
- //----------------------------------------------------------------------------------------
-
- FW_PFile::~FW_PFile()
- {
- }
-
-