packet.hh (9542:683991c46ac8) packet.hh (9543:a373b2e664ff)
1/*
2 * Copyright (c) 2012-2013 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 440 unchanged lines hidden (view full) ---

449 * assumes the current sender state is not NULL. This should be
450 * preferred over direct manipulation of the senderState member
451 * variable.
452 *
453 * @return The current top of the stack
454 */
455 SenderState *popSenderState();
456
1/*
2 * Copyright (c) 2012-2013 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 440 unchanged lines hidden (view full) ---

449 * assumes the current sender state is not NULL. This should be
450 * preferred over direct manipulation of the senderState member
451 * variable.
452 *
453 * @return The current top of the stack
454 */
455 SenderState *popSenderState();
456
457 /**
458 * Go through the sender state stack and return the first instance
459 * that is of type T (as determined by a dynamic_cast). If there
460 * is no sender state of type T, NULL is returned.
461 *
462 * @return The topmost state of type T
463 */
464 template <typename T>
465 T * findNextSenderState() const
466 {
467 T *t = NULL;
468 SenderState* sender_state = senderState;
469 while (t == NULL && sender_state != NULL) {
470 t = dynamic_cast<T*>(sender_state);
471 sender_state = sender_state->predecessor;
472 }
473 return t;
474 }
475
457 /// Return the string name of the cmd field (for debugging and
458 /// tracing).
459 const std::string &cmdString() const { return cmd.toString(); }
460
461 /// Return the index of this command.
462 inline int cmdToIndex() const { return cmd.toInt(); }
463
464 bool isRead() const { return cmd.isRead(); }

--- 424 unchanged lines hidden ---
476 /// Return the string name of the cmd field (for debugging and
477 /// tracing).
478 const std::string &cmdString() const { return cmd.toString(); }
479
480 /// Return the index of this command.
481 inline int cmdToIndex() const { return cmd.toInt(); }
482
483 bool isRead() const { return cmd.isRead(); }

--- 424 unchanged lines hidden ---