mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 12:32:56 +01:00
Implemented Genode::print for Affinities to make printing affinities to console more convenient.
This commit is contained in:
@@ -93,6 +93,7 @@ class Genode::Affinity
|
|||||||
return Affinity::Space(node.attribute_value("width", 0U),
|
return Affinity::Space(node.attribute_value("width", 0U),
|
||||||
node.attribute_value("height", 0U));
|
node.attribute_value("height", 0U));
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -236,6 +237,30 @@ class Genode::Affinity
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
namespace Genode {
|
||||||
|
static inline void print(Output &out, const Affinity::Space &space)
|
||||||
|
{
|
||||||
|
Genode::print(out, "(");
|
||||||
|
Genode::print(out, space.width());
|
||||||
|
Genode::print(out, ",");
|
||||||
|
Genode::print(out, space.height());
|
||||||
|
Genode::print(out, ")");
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void print(Output &out, const Affinity::Location &loc)
|
||||||
|
{
|
||||||
|
Genode::print(out, "(");
|
||||||
|
Genode::print(out, loc.xpos());
|
||||||
|
Genode::print(out, ",");
|
||||||
|
Genode::print(out, loc.ypos());
|
||||||
|
Genode::print(out, ",");
|
||||||
|
Genode::print(out, loc.width());
|
||||||
|
Genode::print(out, "×");
|
||||||
|
Genode::print(out, loc.height());
|
||||||
|
Genode::print(out, ")");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Genode::Affinity::Location Genode::Affinity::Space::location_of_index(int index) const
|
Genode::Affinity::Location Genode::Affinity::Space::location_of_index(int index) const
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user