This represents the basic message that is passed around amongst the generals during operation. Each receiving general (regardless of loyalty) is obligated to append their Unique ID to the enclosed communication_path. A Loyal General will never modify the enclosed marching_orders, while Disloyal Generals may to cause as much confusion as possible. More...
#include <order.h>
Public Member Functions | |
| Order (const SharedMemoryUIntAllocator &alloc, MarchingOrders::type march_orders=MarchingOrders::kInvalid) | |
| Constructor. | |
| Order (const Order &o) | |
| Copy Constructor. | |
| ~Order () | |
| Destructor. | |
| void | AppendCommPathEntry (const unsigned int kUniqueID) |
| Helper function to add a general's unique ID to the communication_path. | |
| boost::interprocess::string | CommunicationPathToString () const |
| Convert the enclosed communication path to a human readable string where unique IDs are delimited by a space. For example, if the communication path contains the General IDs 0 and 1, the output of this function would be "0 1". | |
Static Public Member Functions | |
| static boost::interprocess::string | MarchingOrderTypeToString (MarchingOrders::type marching_order) |
| Helper function to convert a marching order to a human readable string. For example, MarchingOrders::kAttack will get converted to "Attack". This same paradigm applies to both "Retreat" and "Invalid". | |
Public Attributes | |
| SharedMemoryUIntList | communication_path |
| A list of Generals' Unique IDs whom have seen this Order. The first entry was the General who created this Order, and the last entry is the currently owning General. All Generals who receive this Order are required to append their Unique ID to the list, preferably using AppendCommPathEntry. | |
| MarchingOrders::type | marching_orders |
| The relayed Order. | |
This represents the basic message that is passed around amongst the generals during operation. Each receiving general (regardless of loyalty) is obligated to append their Unique ID to the enclosed communication_path. A Loyal General will never modify the enclosed marching_orders, while Disloyal Generals may to cause as much confusion as possible.
Definition at line 43 of file order.h.
| Order::Order | ( | const SharedMemoryUIntAllocator & | alloc, | |
| MarchingOrders::type | march_orders = MarchingOrders::kInvalid | |||
| ) |
Constructor.
| alloc | The allocator to use in the underlying communication_path | |
| march_orders | The initial marching orders to carry |
| Order::Order | ( | const Order & | o | ) |
| void Order::AppendCommPathEntry | ( | const unsigned int | kUniqueID | ) |
Helper function to add a general's unique ID to the communication_path.
| kUniqueID | General's Unique ID |
Definition at line 55 of file order.cpp.

| boost::interprocess::string Order::CommunicationPathToString | ( | ) | const |
Convert the enclosed communication path to a human readable string where unique IDs are delimited by a space. For example, if the communication path contains the General IDs 0 and 1, the output of this function would be "0 1".
| boost::interprocess::string Order::MarchingOrderTypeToString | ( | MarchingOrders::type | marching_order | ) | [static] |
Helper function to convert a marching order to a human readable string. For example, MarchingOrders::kAttack will get converted to "Attack". This same paradigm applies to both "Retreat" and "Invalid".
| marching_order | Marching order to convert |
Definition at line 31 of file order.cpp.

A list of Generals' Unique IDs whom have seen this Order. The first entry was the General who created this Order, and the last entry is the currently owning General. All Generals who receive this Order are required to append their Unique ID to the list, preferably using AppendCommPathEntry.
1.6.3