00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef NCL_NXSDEFS_H
00020 #define NCL_NXSDEFS_H
00021
00022 #include <iostream>
00023 #include <vector>
00024 #include <map>
00025 #include <set>
00026 #include <list>
00027 #include <utility>
00028
00029 #define NCL_MAJOR_VERSION 2
00030 #define NCL_MINOR_VERSION 1
00031 #define NCL_NAME_AND_VERSION "NCL version 2.1.10"
00032 #define NCL_COPYRIGHT "Copyright (c) 1999-2010 by Paul O. Lewis"
00033 #define NCL_HOMEPAGEURL "http://sourceforge.net/projects/ncl"
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043 #if defined(NCL_CONST_FUNCS) && NCL_CONST_FUNCS
00044 # define NCL_COULD_BE_CONST const
00045 int onlyDefinedInCouldBeConst();
00046 #else
00047 # define NCL_COULD_BE_CONST
00048 #endif
00049
00050 #if defined(IGNORE_NXS_ASSERT) || defined(NDEBUG)
00051 # define NCL_ASSERT(expr)
00052 #else
00053 void ncl_assertion_failed(char const * expr, char const * function, char const * file, long line);
00054 # define NCL_ASSERT(expr) if (!(expr)) ncl_assertion_failed((const char *)#expr, (const char *)__FUNCTION__, __FILE__, __LINE__)
00055 #endif
00056
00057
00058
00059
00060
00061
00062
00063 #define NCL_MAX_STATES 76
00064
00065 typedef std::streampos file_pos;
00066
00067 #define SUPPORT_OLD_NCL_NAMES
00068
00069 class NxsString;
00070
00071 typedef std::vector<bool> NxsBoolVector;
00072 typedef std::vector<char> NxsCharVector;
00073 typedef std::vector<int> NxsIntVector;
00074 typedef std::vector<unsigned> NxsUnsignedVector;
00075 typedef std::vector<NxsString> NxsStringVector;
00076 typedef std::vector<NxsStringVector> NxsAllelesVector;
00077
00078 typedef std::set<unsigned> NxsUnsignedSet;
00079
00080 typedef std::map< unsigned, NxsStringVector> NxsStringVectorMap;
00081 typedef std::map< NxsString, NxsString> NxsStringMap;
00082 typedef std::map< NxsString, NxsUnsignedSet> NxsUnsignedSetMap;
00083
00084 typedef std::pair<std::string, NxsUnsignedSet> NxsPartitionGroup;
00085 typedef std::list<NxsPartitionGroup> NxsPartition;
00086 typedef std::map<std::string, NxsPartition> NxsPartitionsByName;
00087
00088
00089
00090
00091 typedef NxsBoolVector BoolVect;
00092 typedef NxsUnsignedSet IntSet;
00093 typedef NxsUnsignedSetMap IntSetMap;
00094 typedef NxsAllelesVector AllelesVect;
00095 typedef NxsStringVector LabelList;
00096 typedef NxsStringVector StrVec;
00097 typedef NxsStringVector vecStr;
00098 typedef NxsStringVectorMap LabelListBag;
00099 typedef NxsStringMap AssocList;
00100
00101 class ProcessedNxsToken;
00102 typedef std::vector<ProcessedNxsToken> ProcessedNxsCommand;
00103
00104 #endif