Use singular in type names (BelRange, WireIterator)

Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
Clifford Wolf 2018-06-02 12:57:19 +02:00
parent 90c7e3b13d
commit cdb31fdafc

View File

@ -134,12 +134,12 @@ namespace std
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
struct BelsIterator struct BelIterator
{ {
int cursor; int cursor;
void operator++() { cursor++; } void operator++() { cursor++; }
bool operator!=(const BelsIterator &other) const { return cursor != other.cursor; } bool operator!=(const BelIterator &other) const { return cursor != other.cursor; }
BelId operator*() const { BelId operator*() const {
BelId ret; BelId ret;
@ -148,21 +148,21 @@ struct BelsIterator
} }
}; };
struct BelsRange struct BelRange
{ {
BelsIterator b, e; BelIterator b, e;
BelsIterator begin() const { return b; } BelIterator begin() const { return b; }
BelsIterator end() const { return e; } BelIterator end() const { return e; }
}; };
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
struct AllWiresIterator struct AllWireIterator
{ {
int cursor; int cursor;
void operator++() { cursor++; } void operator++() { cursor++; }
bool operator!=(const AllWiresIterator &other) const { return cursor != other.cursor; } bool operator!=(const AllWireIterator &other) const { return cursor != other.cursor; }
WireId operator*() const { WireId operator*() const {
WireId ret; WireId ret;
@ -171,11 +171,11 @@ struct AllWiresIterator
} }
}; };
struct AllWiresRange struct AllWireRange
{ {
AllWiresIterator b, e; AllWireIterator b, e;
AllWiresIterator begin() const { return b; } AllWireIterator begin() const { return b; }
AllWiresIterator end() const { return e; } AllWireIterator end() const { return e; }
}; };
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
@ -285,17 +285,17 @@ struct Chip
return wire_data[wire.index].name; return wire_data[wire.index].name;
} }
BelsRange getBels() const BelRange getBels() const
{ {
BelsRange range; BelRange range;
range.b.cursor = 0; range.b.cursor = 0;
range.e.cursor = num_bels; range.e.cursor = num_bels;
return range; return range;
} }
BelsRange getBelsByType(BelType type) const BelRange getBelsByType(BelType type) const
{ {
BelsRange range; BelRange range;
// FIXME // FIXME
#if 0 #if 0
if (type == "TYPE_A") { if (type == "TYPE_A") {
@ -317,9 +317,9 @@ struct Chip
// FIXME: vector<GuiLine> getBelGuiLines(BelId bel) const; // FIXME: vector<GuiLine> getBelGuiLines(BelId bel) const;
// FIXME: vector<GuiLine> getWireGuiLines(WireId wire) const; // FIXME: vector<GuiLine> getWireGuiLines(WireId wire) const;
AllWiresRange getWires() const AllWireRange getWires() const
{ {
AllWiresRange range; AllWireRange range;
range.b.cursor = 0; range.b.cursor = 0;
range.e.cursor = num_wires; range.e.cursor = num_wires;
return range; return range;