forked from github/verilator
Internals: Add missing const. No functional change.
This commit is contained in:
parent
8d3dad510f
commit
73f5e3f808
198
src/V3Ast.h
198
src/V3Ast.h
@ -82,11 +82,11 @@ public:
|
||||
inline AstType(en _e) : m_e(_e) {}
|
||||
explicit inline AstType(int _e) : m_e(static_cast<en>(_e)) {}
|
||||
operator en() const { return m_e; }
|
||||
};
|
||||
inline bool operator==(AstType lhs, AstType rhs) { return (lhs.m_e == rhs.m_e); }
|
||||
inline bool operator==(AstType lhs, AstType::en rhs) { return (lhs.m_e == rhs); }
|
||||
inline bool operator==(AstType::en lhs, AstType rhs) { return (lhs == rhs.m_e); }
|
||||
inline std::ostream& operator<<(std::ostream& os, const AstType& rhs) { return os<<rhs.ascii(); }
|
||||
};
|
||||
inline bool operator==(const AstType& lhs, const AstType& rhs) { return lhs.m_e == rhs.m_e; }
|
||||
inline bool operator==(const AstType& lhs, AstType::en rhs) { return lhs.m_e == rhs; }
|
||||
inline bool operator==(AstType::en lhs, const AstType& rhs) { return lhs == rhs.m_e; }
|
||||
inline std::ostream& operator<<(std::ostream& os, const AstType& rhs) { return os << rhs.ascii(); }
|
||||
|
||||
//######################################################################
|
||||
|
||||
@ -128,11 +128,13 @@ public:
|
||||
inline bool isSigned() const { return m_e==SIGNED; }
|
||||
inline bool isNosign() const { return m_e==NOSIGN; }
|
||||
// No isUnsigned() as it's ambiguous if NOSIGN should be included or not.
|
||||
};
|
||||
inline bool operator==(AstNumeric lhs, AstNumeric rhs) { return (lhs.m_e == rhs.m_e); }
|
||||
inline bool operator==(AstNumeric lhs, AstNumeric::en rhs) { return (lhs.m_e == rhs); }
|
||||
inline bool operator==(AstNumeric::en lhs, AstNumeric rhs) { return (lhs == rhs.m_e); }
|
||||
inline std::ostream& operator<<(std::ostream& os, const AstNumeric& rhs) { return os<<rhs.ascii(); }
|
||||
};
|
||||
inline bool operator==(const AstNumeric& lhs, const AstNumeric& rhs) { return lhs.m_e == rhs.m_e; }
|
||||
inline bool operator==(const AstNumeric& lhs, AstNumeric::en rhs) { return lhs.m_e == rhs; }
|
||||
inline bool operator==(AstNumeric::en lhs, const AstNumeric& rhs) { return lhs == rhs.m_e; }
|
||||
inline std::ostream& operator<<(std::ostream& os, const AstNumeric& rhs) {
|
||||
return os << rhs.ascii();
|
||||
}
|
||||
|
||||
//######################################################################
|
||||
|
||||
@ -156,10 +158,12 @@ public:
|
||||
inline AstPragmaType(en _e) : m_e(_e) {}
|
||||
explicit inline AstPragmaType(int _e) : m_e(static_cast<en>(_e)) {}
|
||||
operator en() const { return m_e; }
|
||||
};
|
||||
inline bool operator==(AstPragmaType lhs, AstPragmaType rhs) { return (lhs.m_e == rhs.m_e); }
|
||||
inline bool operator==(AstPragmaType lhs, AstPragmaType::en rhs) { return (lhs.m_e == rhs); }
|
||||
inline bool operator==(AstPragmaType::en lhs, AstPragmaType rhs) { return (lhs == rhs.m_e); }
|
||||
};
|
||||
inline bool operator==(const AstPragmaType& lhs, const AstPragmaType& rhs) {
|
||||
return lhs.m_e == rhs.m_e;
|
||||
}
|
||||
inline bool operator==(const AstPragmaType& lhs, AstPragmaType::en rhs) { return lhs.m_e == rhs; }
|
||||
inline bool operator==(AstPragmaType::en lhs, const AstPragmaType& rhs) { return lhs == rhs.m_e; }
|
||||
|
||||
//######################################################################
|
||||
|
||||
@ -184,10 +188,12 @@ public:
|
||||
bool isTrace() const { return (m_e==TRACE_INIT || m_e==TRACE_INIT_SUB
|
||||
|| m_e==TRACE_FULL || m_e==TRACE_FULL_SUB
|
||||
|| m_e==TRACE_CHANGE || m_e==TRACE_CHANGE_SUB); }
|
||||
};
|
||||
inline bool operator==(AstCFuncType lhs, AstCFuncType rhs) { return (lhs.m_e == rhs.m_e); }
|
||||
inline bool operator==(AstCFuncType lhs, AstCFuncType::en rhs) { return (lhs.m_e == rhs); }
|
||||
inline bool operator==(AstCFuncType::en lhs, AstCFuncType rhs) { return (lhs == rhs.m_e); }
|
||||
};
|
||||
inline bool operator==(const AstCFuncType& lhs, const AstCFuncType& rhs) {
|
||||
return lhs.m_e == rhs.m_e;
|
||||
}
|
||||
inline bool operator==(const AstCFuncType& lhs, AstCFuncType::en rhs) { return lhs.m_e == rhs; }
|
||||
inline bool operator==(AstCFuncType::en lhs, const AstCFuncType& rhs) { return lhs == rhs.m_e; }
|
||||
|
||||
//######################################################################
|
||||
|
||||
@ -273,10 +279,10 @@ public:
|
||||
inline VEdgeType(en _e) : m_e(_e) {}
|
||||
explicit inline VEdgeType(int _e) : m_e(static_cast<en>(_e)) {}
|
||||
operator en() const { return m_e; }
|
||||
};
|
||||
inline bool operator==(VEdgeType lhs, VEdgeType rhs) { return (lhs.m_e == rhs.m_e); }
|
||||
inline bool operator==(VEdgeType lhs, VEdgeType::en rhs) { return (lhs.m_e == rhs); }
|
||||
inline bool operator==(VEdgeType::en lhs, VEdgeType rhs) { return (lhs == rhs.m_e); }
|
||||
};
|
||||
inline bool operator==(const VEdgeType& lhs, const VEdgeType& rhs) { return lhs.m_e == rhs.m_e; }
|
||||
inline bool operator==(const VEdgeType& lhs, VEdgeType::en rhs) { return lhs.m_e == rhs; }
|
||||
inline bool operator==(VEdgeType::en lhs, const VEdgeType& rhs) { return lhs == rhs.m_e; }
|
||||
|
||||
//######################################################################
|
||||
|
||||
@ -345,10 +351,12 @@ public:
|
||||
inline AstAttrType(en _e) : m_e(_e) {}
|
||||
explicit inline AstAttrType(int _e) : m_e(static_cast<en>(_e)) {}
|
||||
operator en() const { return m_e; }
|
||||
};
|
||||
inline bool operator==(AstAttrType lhs, AstAttrType rhs) { return (lhs.m_e == rhs.m_e); }
|
||||
inline bool operator==(AstAttrType lhs, AstAttrType::en rhs) { return (lhs.m_e == rhs); }
|
||||
inline bool operator==(AstAttrType::en lhs, AstAttrType rhs) { return (lhs == rhs.m_e); }
|
||||
};
|
||||
inline bool operator==(const AstAttrType& lhs, const AstAttrType& rhs) {
|
||||
return lhs.m_e == rhs.m_e;
|
||||
}
|
||||
inline bool operator==(const AstAttrType& lhs, AstAttrType::en rhs) { return lhs.m_e == rhs; }
|
||||
inline bool operator==(AstAttrType::en lhs, const AstAttrType& rhs) { return lhs == rhs.m_e; }
|
||||
|
||||
//######################################################################
|
||||
|
||||
@ -472,10 +480,16 @@ public:
|
||||
}
|
||||
bool isDouble() const { return m_e==DOUBLE; }
|
||||
bool isString() const { return m_e==STRING; }
|
||||
};
|
||||
inline bool operator==(AstBasicDTypeKwd lhs, AstBasicDTypeKwd rhs) { return (lhs.m_e == rhs.m_e); }
|
||||
inline bool operator==(AstBasicDTypeKwd lhs, AstBasicDTypeKwd::en rhs) { return (lhs.m_e == rhs); }
|
||||
inline bool operator==(AstBasicDTypeKwd::en lhs, AstBasicDTypeKwd rhs) { return (lhs == rhs.m_e); }
|
||||
};
|
||||
inline bool operator==(const AstBasicDTypeKwd& lhs, const AstBasicDTypeKwd& rhs) {
|
||||
return lhs.m_e == rhs.m_e;
|
||||
}
|
||||
inline bool operator==(const AstBasicDTypeKwd& lhs, AstBasicDTypeKwd::en rhs) {
|
||||
return lhs.m_e == rhs;
|
||||
}
|
||||
inline bool operator==(AstBasicDTypeKwd::en lhs, const AstBasicDTypeKwd& rhs) {
|
||||
return lhs == rhs.m_e;
|
||||
}
|
||||
|
||||
//######################################################################
|
||||
|
||||
@ -517,11 +531,13 @@ public:
|
||||
bool isWritable() const { return m_e == OUTPUT || m_e == INOUT
|
||||
|| m_e == REF; }
|
||||
bool isRefOrConstRef() const { return m_e == REF || m_e == CONSTREF; }
|
||||
};
|
||||
inline bool operator==(VDirection lhs, VDirection rhs) { return (lhs.m_e == rhs.m_e); }
|
||||
inline bool operator==(VDirection lhs, VDirection::en rhs) { return (lhs.m_e == rhs); }
|
||||
inline bool operator==(VDirection::en lhs, VDirection rhs) { return (lhs == rhs.m_e); }
|
||||
inline std::ostream& operator<<(std::ostream& os, const VDirection& rhs) { return os<<rhs.ascii(); }
|
||||
};
|
||||
inline bool operator==(const VDirection& lhs, const VDirection& rhs) { return lhs.m_e == rhs.m_e; }
|
||||
inline bool operator==(const VDirection& lhs, VDirection::en rhs) { return lhs.m_e == rhs; }
|
||||
inline bool operator==(VDirection::en lhs, const VDirection& rhs) { return lhs == rhs.m_e; }
|
||||
inline std::ostream& operator<<(std::ostream& os, const VDirection& rhs) {
|
||||
return os << rhs.ascii();
|
||||
}
|
||||
|
||||
//######################################################################
|
||||
|
||||
@ -550,11 +566,19 @@ public:
|
||||
bool falseUnknown() const { return m_e == BU_FALSE || m_e == BU_UNKNOWN; }
|
||||
bool unknown() const { return m_e == BU_UNKNOWN; }
|
||||
void setTrueOrFalse(bool flag) { m_e = flag ? BU_TRUE : BU_FALSE; }
|
||||
};
|
||||
inline bool operator==(VBoolOrUnknown lhs, VBoolOrUnknown rhs) { return (lhs.m_e == rhs.m_e); }
|
||||
inline bool operator==(VBoolOrUnknown lhs, VBoolOrUnknown::en rhs) { return (lhs.m_e == rhs); }
|
||||
inline bool operator==(VBoolOrUnknown::en lhs, VBoolOrUnknown rhs) { return (lhs == rhs.m_e); }
|
||||
inline std::ostream& operator<<(std::ostream& os, const VBoolOrUnknown& rhs) { return os<<rhs.ascii(); }
|
||||
};
|
||||
inline bool operator==(const VBoolOrUnknown& lhs, const VBoolOrUnknown& rhs) {
|
||||
return lhs.m_e == rhs.m_e;
|
||||
}
|
||||
inline bool operator==(const VBoolOrUnknown& lhs, VBoolOrUnknown::en rhs) {
|
||||
return lhs.m_e == rhs;
|
||||
}
|
||||
inline bool operator==(VBoolOrUnknown::en lhs, const VBoolOrUnknown& rhs) {
|
||||
return lhs == rhs.m_e;
|
||||
}
|
||||
inline std::ostream& operator<<(std::ostream& os, const VBoolOrUnknown& rhs) {
|
||||
return os << rhs.ascii();
|
||||
}
|
||||
|
||||
//######################################################################
|
||||
|
||||
@ -619,11 +643,13 @@ public:
|
||||
bool isTemp() const {
|
||||
return (m_e==BLOCKTEMP || m_e==MODULETEMP || m_e==STMTTEMP || m_e==XTEMP);
|
||||
}
|
||||
};
|
||||
inline bool operator==(AstVarType lhs, AstVarType rhs) { return (lhs.m_e == rhs.m_e); }
|
||||
inline bool operator==(AstVarType lhs, AstVarType::en rhs) { return (lhs.m_e == rhs); }
|
||||
inline bool operator==(AstVarType::en lhs, AstVarType rhs) { return (lhs == rhs.m_e); }
|
||||
inline std::ostream& operator<<(std::ostream& os, const AstVarType& rhs) { return os<<rhs.ascii(); }
|
||||
};
|
||||
inline bool operator==(const AstVarType& lhs, const AstVarType& rhs) { return lhs.m_e == rhs.m_e; }
|
||||
inline bool operator==(const AstVarType& lhs, AstVarType::en rhs) { return lhs.m_e == rhs; }
|
||||
inline bool operator==(AstVarType::en lhs, const AstVarType& rhs) { return lhs == rhs.m_e; }
|
||||
inline std::ostream& operator<<(std::ostream& os, const AstVarType& rhs) {
|
||||
return os << rhs.ascii();
|
||||
}
|
||||
|
||||
//######################################################################
|
||||
|
||||
@ -654,11 +680,15 @@ public:
|
||||
static const char* const names[] = {
|
||||
"", "VL_LIKELY", "VL_UNLIKELY"};
|
||||
return names[m_e]; }
|
||||
};
|
||||
inline bool operator==(VBranchPred lhs, VBranchPred rhs) { return (lhs.m_e == rhs.m_e); }
|
||||
inline bool operator==(VBranchPred lhs, VBranchPred::en rhs) { return (lhs.m_e == rhs); }
|
||||
inline bool operator==(VBranchPred::en lhs, VBranchPred rhs) { return (lhs == rhs.m_e); }
|
||||
inline std::ostream& operator<<(std::ostream& os, const VBranchPred& rhs) { return os<<rhs.ascii(); }
|
||||
};
|
||||
inline bool operator==(const VBranchPred& lhs, const VBranchPred& rhs) {
|
||||
return lhs.m_e == rhs.m_e;
|
||||
}
|
||||
inline bool operator==(const VBranchPred& lhs, VBranchPred::en rhs) { return lhs.m_e == rhs; }
|
||||
inline bool operator==(VBranchPred::en lhs, const VBranchPred& rhs) { return lhs == rhs.m_e; }
|
||||
inline std::ostream& operator<<(std::ostream& os, const VBranchPred& rhs) {
|
||||
return os << rhs.ascii();
|
||||
}
|
||||
|
||||
//######################################################################
|
||||
|
||||
@ -687,11 +717,19 @@ public:
|
||||
static const char* const names[] = {
|
||||
"", "clker", "non_clker"};
|
||||
return names[m_e]; }
|
||||
};
|
||||
inline bool operator==(VVarAttrClocker lhs, VVarAttrClocker rhs) { return (lhs.m_e == rhs.m_e); }
|
||||
inline bool operator==(VVarAttrClocker lhs, VVarAttrClocker::en rhs) { return (lhs.m_e == rhs); }
|
||||
inline bool operator==(VVarAttrClocker::en lhs, VVarAttrClocker rhs) { return (lhs == rhs.m_e); }
|
||||
inline std::ostream& operator<<(std::ostream& os, const VVarAttrClocker& rhs) { return os<<rhs.ascii(); }
|
||||
};
|
||||
inline bool operator==(const VVarAttrClocker& lhs, const VVarAttrClocker& rhs) {
|
||||
return lhs.m_e == rhs.m_e;
|
||||
}
|
||||
inline bool operator==(const VVarAttrClocker& lhs, VVarAttrClocker::en rhs) {
|
||||
return lhs.m_e == rhs;
|
||||
}
|
||||
inline bool operator==(VVarAttrClocker::en lhs, const VVarAttrClocker& rhs) {
|
||||
return lhs == rhs.m_e;
|
||||
}
|
||||
inline std::ostream& operator<<(std::ostream& os, const VVarAttrClocker& rhs) {
|
||||
return os << rhs.ascii();
|
||||
}
|
||||
|
||||
//######################################################################
|
||||
|
||||
@ -713,10 +751,10 @@ public:
|
||||
static const char* const names[] = {
|
||||
"always", "always_ff", "always_latch", "always_comb"};
|
||||
return names[m_e]; }
|
||||
};
|
||||
inline bool operator==(VAlwaysKwd lhs, VAlwaysKwd rhs) { return (lhs.m_e == rhs.m_e); }
|
||||
inline bool operator==(VAlwaysKwd lhs, VAlwaysKwd::en rhs) { return (lhs.m_e == rhs); }
|
||||
inline bool operator==(VAlwaysKwd::en lhs, VAlwaysKwd rhs) { return (lhs == rhs.m_e); }
|
||||
};
|
||||
inline bool operator==(const VAlwaysKwd& lhs, const VAlwaysKwd& rhs) { return lhs.m_e == rhs.m_e; }
|
||||
inline bool operator==(const VAlwaysKwd& lhs, VAlwaysKwd::en rhs) { return lhs.m_e == rhs; }
|
||||
inline bool operator==(VAlwaysKwd::en lhs, const VAlwaysKwd& rhs) { return lhs == rhs.m_e; }
|
||||
|
||||
//######################################################################
|
||||
|
||||
@ -734,10 +772,10 @@ public:
|
||||
inline VCaseType(en _e) : m_e(_e) {}
|
||||
explicit inline VCaseType(int _e) : m_e(static_cast<en>(_e)) {}
|
||||
operator en() const { return m_e; }
|
||||
};
|
||||
inline bool operator==(VCaseType lhs, VCaseType rhs) { return (lhs.m_e == rhs.m_e); }
|
||||
inline bool operator==(VCaseType lhs, VCaseType::en rhs) { return (lhs.m_e == rhs); }
|
||||
inline bool operator==(VCaseType::en lhs, VCaseType rhs) { return (lhs == rhs.m_e); }
|
||||
};
|
||||
inline bool operator==(const VCaseType& lhs, const VCaseType& rhs) { return lhs.m_e == rhs.m_e; }
|
||||
inline bool operator==(const VCaseType& lhs, VCaseType::en rhs) { return lhs.m_e == rhs; }
|
||||
inline bool operator==(VCaseType::en lhs, const VCaseType& rhs) { return lhs == rhs.m_e; }
|
||||
|
||||
//######################################################################
|
||||
|
||||
@ -763,10 +801,16 @@ public:
|
||||
static const char* const names[] = {
|
||||
"display", "write", "info", "error", "warning", "fatal"};
|
||||
return names[m_e]; }
|
||||
};
|
||||
inline bool operator==(AstDisplayType lhs, AstDisplayType rhs) { return (lhs.m_e == rhs.m_e); }
|
||||
inline bool operator==(AstDisplayType lhs, AstDisplayType::en rhs) { return (lhs.m_e == rhs); }
|
||||
inline bool operator==(AstDisplayType::en lhs, AstDisplayType rhs) { return (lhs == rhs.m_e); }
|
||||
};
|
||||
inline bool operator==(const AstDisplayType& lhs, const AstDisplayType& rhs) {
|
||||
return lhs.m_e == rhs.m_e;
|
||||
}
|
||||
inline bool operator==(const AstDisplayType& lhs, AstDisplayType::en rhs) {
|
||||
return lhs.m_e == rhs;
|
||||
}
|
||||
inline bool operator==(AstDisplayType::en lhs, const AstDisplayType& rhs) {
|
||||
return lhs == rhs.m_e;
|
||||
}
|
||||
|
||||
//######################################################################
|
||||
|
||||
@ -786,11 +830,15 @@ public:
|
||||
static const char* const names[] = {
|
||||
"", "TEXT", "PREDOT"};
|
||||
return names[m_e]; }
|
||||
};
|
||||
inline bool operator==(VParseRefExp lhs, VParseRefExp rhs) { return (lhs.m_e == rhs.m_e); }
|
||||
inline bool operator==(VParseRefExp lhs, VParseRefExp::en rhs) { return (lhs.m_e == rhs); }
|
||||
inline bool operator==(VParseRefExp::en lhs, VParseRefExp rhs) { return (lhs == rhs.m_e); }
|
||||
inline std::ostream& operator<<(std::ostream& os, const VParseRefExp& rhs) { return os<<rhs.ascii(); }
|
||||
};
|
||||
inline bool operator==(const VParseRefExp& lhs, const VParseRefExp& rhs) {
|
||||
return lhs.m_e == rhs.m_e;
|
||||
}
|
||||
inline bool operator==(const VParseRefExp& lhs, VParseRefExp::en rhs) { return lhs.m_e == rhs; }
|
||||
inline bool operator==(VParseRefExp::en lhs, const VParseRefExp& rhs) { return lhs == rhs.m_e; }
|
||||
inline std::ostream& operator<<(std::ostream& os, const VParseRefExp& rhs) {
|
||||
return os << rhs.ascii();
|
||||
}
|
||||
|
||||
//######################################################################
|
||||
// VNumRange - Structure containing numeric range information
|
||||
@ -873,9 +921,9 @@ public:
|
||||
return names[m_e];
|
||||
}
|
||||
};
|
||||
inline bool operator==(VUseType lhs, VUseType rhs) { return (lhs.m_e == rhs.m_e); }
|
||||
inline bool operator==(VUseType lhs, VUseType::en rhs) { return (lhs.m_e == rhs); }
|
||||
inline bool operator==(VUseType::en lhs, VUseType rhs) { return (lhs == rhs.m_e); }
|
||||
inline bool operator==(const VUseType& lhs, const VUseType& rhs) { return lhs.m_e == rhs.m_e; }
|
||||
inline bool operator==(const VUseType& lhs, VUseType::en rhs) { return lhs.m_e == rhs; }
|
||||
inline bool operator==(VUseType::en lhs, const VUseType& rhs) { return lhs == rhs.m_e; }
|
||||
inline std::ostream& operator<<(std::ostream& os, const VUseType& rhs) {
|
||||
return os << rhs.ascii();
|
||||
}
|
||||
|
@ -205,11 +205,15 @@ public:
|
||||
|| m_e==UNDRIVEN
|
||||
|| m_e==UNUSED
|
||||
|| m_e==VARHIDDEN ); }
|
||||
};
|
||||
inline bool operator==(V3ErrorCode lhs, V3ErrorCode rhs) { return (lhs.m_e == rhs.m_e); }
|
||||
inline bool operator==(V3ErrorCode lhs, V3ErrorCode::en rhs) { return (lhs.m_e == rhs); }
|
||||
inline bool operator==(V3ErrorCode::en lhs, V3ErrorCode rhs) { return (lhs == rhs.m_e); }
|
||||
inline std::ostream& operator<<(std::ostream& os, V3ErrorCode rhs) { return os<<rhs.ascii(); }
|
||||
};
|
||||
inline bool operator==(const V3ErrorCode& lhs, const V3ErrorCode& rhs) {
|
||||
return lhs.m_e == rhs.m_e;
|
||||
}
|
||||
inline bool operator==(const V3ErrorCode& lhs, V3ErrorCode::en rhs) { return lhs.m_e == rhs; }
|
||||
inline bool operator==(V3ErrorCode::en lhs, const V3ErrorCode& rhs) { return lhs == rhs.m_e; }
|
||||
inline std::ostream& operator<<(std::ostream& os, const V3ErrorCode& rhs) {
|
||||
return os << rhs.ascii();
|
||||
}
|
||||
|
||||
//######################################################################
|
||||
|
||||
|
@ -240,7 +240,7 @@ public:
|
||||
/// When building an error, additional location for additional references
|
||||
/// Simplified information vs warnContextPrimary() to make dump clearer
|
||||
string warnContextSecondary() const { return warnContext(true); }
|
||||
bool operator==(FileLine rhs) const {
|
||||
bool operator==(const FileLine& rhs) const {
|
||||
return (m_firstLineno == rhs.m_firstLineno
|
||||
&& m_firstColumn == rhs.m_firstColumn
|
||||
&& m_lastLineno == rhs.m_lastLineno
|
||||
|
@ -55,10 +55,16 @@ public:
|
||||
inline VWidthMinUsage(en _e) : m_e(_e) {}
|
||||
explicit inline VWidthMinUsage(int _e) : m_e(static_cast<en>(_e)) {}
|
||||
operator en() const { return m_e; }
|
||||
};
|
||||
inline bool operator==(VWidthMinUsage lhs, VWidthMinUsage rhs) { return (lhs.m_e == rhs.m_e); }
|
||||
inline bool operator==(VWidthMinUsage lhs, VWidthMinUsage::en rhs) { return (lhs.m_e == rhs); }
|
||||
inline bool operator==(VWidthMinUsage::en lhs, VWidthMinUsage rhs) { return (lhs == rhs.m_e); }
|
||||
};
|
||||
inline bool operator==(const VWidthMinUsage& lhs, const VWidthMinUsage& rhs) {
|
||||
return lhs.m_e == rhs.m_e;
|
||||
}
|
||||
inline bool operator==(const VWidthMinUsage& lhs, VWidthMinUsage::en rhs) {
|
||||
return lhs.m_e == rhs;
|
||||
}
|
||||
inline bool operator==(VWidthMinUsage::en lhs, const VWidthMinUsage& rhs) {
|
||||
return lhs == rhs.m_e;
|
||||
}
|
||||
|
||||
//######################################################################
|
||||
// V3Global - The top level class for the entire program
|
||||
|
@ -71,9 +71,9 @@ public:
|
||||
bool forward() const { return m_e == FORWARD; }
|
||||
bool reverse() const { return m_e != FORWARD; }
|
||||
};
|
||||
inline bool operator==(GraphWay lhs, GraphWay rhs) { return (lhs.m_e == rhs.m_e); }
|
||||
inline bool operator==(GraphWay lhs, GraphWay::en rhs) { return (lhs.m_e == rhs); }
|
||||
inline bool operator==(GraphWay::en lhs, GraphWay rhs) { return (lhs == rhs.m_e); }
|
||||
inline bool operator==(const GraphWay& lhs, const GraphWay& rhs) { return lhs.m_e == rhs.m_e; }
|
||||
inline bool operator==(const GraphWay& lhs, GraphWay::en rhs) { return lhs.m_e == rhs; }
|
||||
inline bool operator==(GraphWay::en lhs, const GraphWay& rhs) { return lhs == rhs.m_e; }
|
||||
|
||||
//============================================================================
|
||||
|
||||
|
@ -62,11 +62,15 @@ public:
|
||||
static const char* const names[] = {
|
||||
"DEFAULT_FALSE", "DEFAULT_TRUE", "TRUE", "FALSE"};
|
||||
return names[m_e]; }
|
||||
};
|
||||
inline bool operator==(VOptionBool lhs, VOptionBool rhs) { return (lhs.m_e == rhs.m_e); }
|
||||
inline bool operator==(VOptionBool lhs, VOptionBool::en rhs) { return (lhs.m_e == rhs); }
|
||||
inline bool operator==(VOptionBool::en lhs, VOptionBool rhs) { return (lhs == rhs.m_e); }
|
||||
inline std::ostream& operator<<(std::ostream& os, const VOptionBool& rhs) { return os<<rhs.ascii(); }
|
||||
};
|
||||
inline bool operator==(const VOptionBool& lhs, const VOptionBool& rhs) {
|
||||
return lhs.m_e == rhs.m_e;
|
||||
}
|
||||
inline bool operator==(const VOptionBool& lhs, VOptionBool::en rhs) { return lhs.m_e == rhs; }
|
||||
inline bool operator==(VOptionBool::en lhs, const VOptionBool& rhs) { return lhs == rhs.m_e; }
|
||||
inline std::ostream& operator<<(std::ostream& os, const VOptionBool& rhs) {
|
||||
return os << rhs.ascii();
|
||||
}
|
||||
|
||||
//######################################################################
|
||||
|
||||
@ -99,9 +103,11 @@ public:
|
||||
return names[m_e];
|
||||
}
|
||||
};
|
||||
inline bool operator==(TraceFormat lhs, TraceFormat rhs) { return (lhs.m_e == rhs.m_e); }
|
||||
inline bool operator==(TraceFormat lhs, TraceFormat::en rhs) { return (lhs.m_e == rhs); }
|
||||
inline bool operator==(TraceFormat::en lhs, TraceFormat rhs) { return (lhs == rhs.m_e); }
|
||||
inline bool operator==(const TraceFormat& lhs, const TraceFormat& rhs) {
|
||||
return lhs.m_e == rhs.m_e;
|
||||
}
|
||||
inline bool operator==(const TraceFormat& lhs, TraceFormat::en rhs) { return lhs.m_e == rhs; }
|
||||
inline bool operator==(TraceFormat::en lhs, const TraceFormat& rhs) { return lhs == rhs.m_e; }
|
||||
|
||||
typedef std::vector<string> V3StringList;
|
||||
typedef std::set<string> V3StringSet;
|
||||
|
@ -103,10 +103,16 @@ struct OrderVEdgeType {
|
||||
inline OrderVEdgeType(en _e) : m_e(_e) {}
|
||||
explicit inline OrderVEdgeType(int _e) : m_e(static_cast<en>(_e)) {}
|
||||
operator en() const { return m_e; }
|
||||
};
|
||||
inline bool operator==(OrderVEdgeType lhs, OrderVEdgeType rhs) { return (lhs.m_e == rhs.m_e); }
|
||||
inline bool operator==(OrderVEdgeType lhs, OrderVEdgeType::en rhs) { return (lhs.m_e == rhs); }
|
||||
inline bool operator==(OrderVEdgeType::en lhs, OrderVEdgeType rhs) { return (lhs == rhs.m_e); }
|
||||
};
|
||||
inline bool operator==(const OrderVEdgeType& lhs, const OrderVEdgeType& rhs) {
|
||||
return lhs.m_e == rhs.m_e;
|
||||
}
|
||||
inline bool operator==(const OrderVEdgeType& lhs, OrderVEdgeType::en rhs) {
|
||||
return lhs.m_e == rhs;
|
||||
}
|
||||
inline bool operator==(OrderVEdgeType::en lhs, const OrderVEdgeType& rhs) {
|
||||
return lhs == rhs.m_e;
|
||||
}
|
||||
|
||||
//######################################################################
|
||||
// Graph types
|
||||
|
Loading…
Reference in New Issue
Block a user