From fdf04f60e0b9ea713670ff75e8896264ea15e75b Mon Sep 17 00:00:00 2001 From: fonsinchen Date: Sun, 9 Jun 2013 12:53:34 +0000 Subject: (svn r25350) -Add: basic definitions for link graph --- src/linkgraph/linkgraph_type.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/linkgraph/linkgraph_type.h') diff --git a/src/linkgraph/linkgraph_type.h b/src/linkgraph/linkgraph_type.h index 13411a707..277e56c73 100644 --- a/src/linkgraph/linkgraph_type.h +++ b/src/linkgraph/linkgraph_type.h @@ -21,4 +21,22 @@ static const LinkGraphID INVALID_LIN_KGRAPH_JOB = UINT16_MAX; typedef uint16 NodeID; static const NodeID INVALID_NODE = UINT16_MAX; +enum DistributionType { + DT_BEGIN = 0, + DT_MIN = 0, + DT_MANUAL = 0, ///< Manual distribution. No link graph calculations are run. + DT_ASYMMETRIC = 1, ///< Asymmetric distribution. Usually cargo will only travel in one direction. + DT_MAX_NONSYMMETRIC = 1, ///< Maximum non-symmetric distribution. + DT_SYMMETRIC = 2, ///< Symmetric distribution. The same amount of cargo travels in each direction between each pair of nodes. + DT_MAX = 2, + DT_NUM = 3, + DT_END = 3 +}; + +/* It needs to be 8bits, because we save and load it as such + * Define basic enum properties + */ +template <> struct EnumPropsT : MakeEnumPropsT {}; +typedef TinyEnumT DistributionTypeByte; // typedefing-enumification of DistributionType + #endif /* LINKGRAPH_TYPE_H */ -- cgit v1.2.3-54-g00ecf