Retired Document
Important: This sample code may not represent best practices for current development. The project may use deprecated symbols and illustrate technologies and techniques that are no longer recommended.
Sources/Template.cp
/* |
File: Template.cp |
Contains: |
Written by: Kent Sandvik |
Copyright: Copyright © 1992-1999 by Apple Computer, Inc., All Rights Reserved. |
You may incorporate this Apple sample source code into your program(s) without |
restriction. This Apple sample source code has been provided "AS IS" and the |
responsibility for its operation is yours. You are not permitted to redistribute |
this Apple sample source code as "Apple sample source code" after having made |
changes. If you're going to re-distribute the source, we require that you make |
it clear in the source that the code was descended from Apple sample source |
code, but that you've made changes. |
Change History (most recent first): |
8/18/1999 Karl Groethe Updated for Metrowerks Codewarror Pro 2.1 |
*/ |
// ¥¥¥Include here the one and only C++ class header file |
// Include files |
#ifndef _FOO_ |
#include "Template.h" |
#endif |
// _________________________________________________________________________________________________________ // |
// TFoo class member function implementations |
// CONSTRUCTORS & DESTRUCTORS |
#pragma segment Foo // ¥¥¥ Note that we use the same segment name as the file name for all member functions! |
TFoo::TFoo() |
// Default constructor. |
{ |
} |
#pragma segment Foo |
TFoo::~TFoo() |
// Destructor, we are not doing anything inside this one just now. |
{ |
} |
// MAIN INTERFACE |
#pragma segment Foo |
Boolean TFoo::KillApplication(ProcessSerialNumber*/*thePSN*/ ) |
// Quit the application which is defined by the PSN |
{ |
return true; |
} |
#pragma segment Foo |
short TFoo::GetNumProcesses() |
// Get the amount of currently running processes. |
{ |
return (short)4; |
} |
// PUBLIC ACCESSORS AND MUTATORS |
#pragma segment Foo |
ProcessSerialNumber TFoo::GetMyProcessID() const |
{ |
return fMyProcessID; |
} |
// ITERATORS |
#pragma segment Foo |
void TFoo::Next() |
{ |
} |
#pragma segment Foo |
Boolean TFoo::Last() |
{ |
return fLast; |
} |
#pragma segment Foo |
void TFoo::First() |
{ |
fProcessID = fFirstPSN; |
} |
#pragma segment Foo |
void TFoo::Reset() |
{ |
} |
// ¥¥¥ Specify here the change history |
// _________________________________________________________________________________________________________ // |
/* Change History (most recent last): |
No Init. Date Comment |
1 khs 6/10/92 New file |
2 khs 7/6/92 First decent working class |
*/ |
Copyright © 2003 Apple Computer, Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2003-01-14