Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

fish.h File Reference

The public interface to fishy functions. More...

Go to the source code of this file.

Data Structures

struct  fish_t
 This structure information about fish in my freezer. More...


Defines

#define MAX_FISH   10
 The number of fish that fit in my freezer.


Enumerations

enum  fishTypes { fishType_none, fishType_trout, fishType_carp, fishType_salmon }
 The types of fish in my freezer. More...


Functions

void FillFreezer ()
 Fills the freezer with fish.

int Weigh (fishTypes inType)
 Returns the total weight of all fish of one type in the freezer.

int WeighEm (fishTypes inType)
 Returns the total weight of all fish of one type in the freezer.


Variables

fish_t freezer [MAX_FISH]
 The fish in my freezer.


Detailed Description

The public interface to fishy functions.

This is the more extensive documentation for this file. In particular, it can span multiple lines whereas the brief documentation is limited to one line.

Date:
June 17 2003
Author:
Aaron Montgomery monsterworks@mac.com.

Definition in file fish.h.


Define Documentation

#define MAX_FISH   10
 

The number of fish that fit in my freezer.

Of course, it really depends on the size of the fish and if I upgrade my freezer I will certainly need to enlarge this number. The only reason for all this typing is create a detailed description.

Definition at line 41 of file fish.h.

Referenced by Weigh(), and WeighEm().


Enumeration Type Documentation

enum fishTypes
 

The types of fish in my freezer.

This is more information about this enumeration, which could span multiple lines and explain why we decided to put these things together in an enumeration.

Enumeration values:
fishType_none  not a fish
fishType_trout  a fish, but not a salmon or a carp
fishType_carp  a fish, but not a trout or a salmon
fishType_salmon  a fish, but not a carp or a trout

Definition at line 17 of file fish.h.


Function Documentation

void FillFreezer  ) 
 

Fills the freezer with fish.

This function places four fish in my freezer. This comment provides the detailed description for this function.

Definition at line 20 of file fish.c.

References fishType_carp, fishType_none, fishType_salmon, fishType_trout, freezer, fish_t::myType, and fish_t::myWeight.

Referenced by main().

int Weigh fishTypes  inType  ) 
 

Returns the total weight of all fish of one type in the freezer.

This function iterates through all the fish in my freezer of a particular type and sums up their weights. This function replaces the defective WeighEm() function.

Parameters:
inType is the type of fish I want to weigh.
Returns:
the total weight of all fish of that type in my freezer.
Bug:
I can't figure out what's going wrong with this function.

Definition at line 38 of file fish.c.

References freezer, MAX_FISH, fish_t::myType, and fish_t::myWeight.

Referenced by main().

int WeighEm fishTypes  inType  ) 
 

Returns the total weight of all fish of one type in the freezer.

This function iterates through all the fish in my freezer of a particular type and sums up their weights.

Parameters:
inType is the type of fish I want to weigh.
Returns:
the total weight of all fish of that type in my freezer.
Deprecated:
Use Weigh instead, at least it doesn't crash.
Bug:
This seems to cause memory corruption problems.

Definition at line 58 of file fish.c.

References freezer, MAX_FISH, fish_t::myType, and fish_t::myWeight.


Variable Documentation

fish_t freezer[MAX_FISH]
 

The fish in my freezer.

Here's where we define the freezer variable, this comment provides the detailed description for this variable.

Definition at line 44 of file fish.h.

Referenced by FillFreezer(), Weigh(), and WeighEm().


Generated on Wed Apr 28 17:08:09 2004 for Fish by doxygen 1.3.4