From 5d2a1f82b5fe8e09bdf7ad595cdea579b5ee61d6 Mon Sep 17 00:00:00 2001 From: sam hatchett Date: Sat, 28 Nov 2015 13:28:32 -0500 Subject: [PATCH] finish moving defines to enums for better documentation --- include/epanet2.h | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/include/epanet2.h b/include/epanet2.h index f612946..c326ec9 100755 --- a/include/epanet2.h +++ b/include/epanet2.h @@ -133,19 +133,26 @@ typedef enum { } EN_TimeProperty; -#define EN_ITERATIONS 0 -#define EN_RELATIVEERROR 1 +typedef enum { + EN_ITERATIONS = 0, + EN_RELATIVEERROR = 1 +} EN_AnalysisStatistic; -#define EN_NODECOUNT 0 /* Component counts */ -#define EN_TANKCOUNT 1 -#define EN_LINKCOUNT 2 -#define EN_PATCOUNT 3 -#define EN_CURVECOUNT 4 -#define EN_CONTROLCOUNT 5 +typedef enum { + EN_NODECOUNT = 0, /**< Number of Nodes (Juntions + Tanks + Reservoirs) */ + EN_TANKCOUNT = 1, /**< Number of Tanks */ + EN_LINKCOUNT = 2, /**< Number of Links (Pipes + Pumps + Valves) */ + EN_PATCOUNT = 3, /**< Number of Time Patterns */ + EN_CURVECOUNT = 4, /**< Number of Curves */ + EN_CONTROLCOUNT = 5 /**< Number of Control Statements */ +} EN_CountType; + +typedef enum { + EN_JUNCTION = 0, + EN_RESERVOIR = 1, + EN_TANK = 2 +} EN_NodeType; -#define EN_JUNCTION 0 /* Node types */ -#define EN_RESERVOIR 1 -#define EN_TANK 2 typedef enum { EN_CVPIPE = 0, /* Link types. */