OpenASIP 2.2
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ProximRFEditPolicy Class Reference

#include <ProximRFEditPolicy.hh>

Inheritance diagram for ProximRFEditPolicy:
Inheritance graph
Collaboration diagram for ProximRFEditPolicy:
Collaboration graph

Public Member Functions

 ProximRFEditPolicy ()
 
virtual ~ProximRFEditPolicy ()
 
virtual ComponentCommandgetCommand (Request *request)
 
virtual bool canHandle (Request *request) const
 
- Public Member Functions inherited from EditPolicy
 EditPolicy ()
 
virtual ~EditPolicy ()
 
EditParthost () const
 
void setHost (EditPart *host)
 

Additional Inherited Members

- Protected Attributes inherited from EditPolicy
EditParthost_
 Host EditPart of this EditPolicy.
 

Detailed Description

Edit policy for register files in the Proxim machine state window.

Definition at line 41 of file ProximRFEditPolicy.hh.

Constructor & Destructor Documentation

◆ ProximRFEditPolicy()

ProximRFEditPolicy::ProximRFEditPolicy ( )

The Constructor.

Definition at line 50 of file ProximRFEditPolicy.cc.

50 :
51 EditPolicy() {
52}

◆ ~ProximRFEditPolicy()

ProximRFEditPolicy::~ProximRFEditPolicy ( )
virtual

The Destructor.

Definition at line 57 of file ProximRFEditPolicy.cc.

57 {
58}

Member Function Documentation

◆ canHandle()

bool ProximRFEditPolicy::canHandle ( Request request) const
virtual

Tells whether this EditPolicy can handle request of the given type.

Parameters
Requestto be handled.
Returns
True, if the editpolicy can handle give request type.

Implements EditPolicy.

Definition at line 67 of file ProximRFEditPolicy.cc.

67 {
68
69 Request::RequestType type = request->type();
70 if (type == Request::MODIFY_REQUEST ||
73
74 return true;
75 }
76
77 return false;
78}
RequestType
Data type for determining the type of a Request.
Definition Request.hh:46
@ DETAILS_REQUEST
Detailed info request.
Definition Request.hh:53
@ STATUS_REQUEST
Status request.
Definition Request.hh:52
@ MODIFY_REQUEST
Modfify request.
Definition Request.hh:48
RequestType type() const

References Request::DETAILS_REQUEST, Request::MODIFY_REQUEST, Request::STATUS_REQUEST, and Request::type().

Here is the call graph for this function:

◆ getCommand()

ComponentCommand * ProximRFEditPolicy::getCommand ( Request request)
virtual

Creates command corresponding to a request.

@paran request Request to handle.

Returns
Null, if the request can't be handled.

Implements EditPolicy.

Definition at line 88 of file ProximRFEditPolicy.cc.

88 {
89
90 Request::RequestType type = request->type();
91 if (type == Request::MODIFY_REQUEST) {
92 return new ProximShowRegistersCmd(host_);
93 } else if (type == Request::STATUS_REQUEST) {
94
95 const RegisterFile* rf = dynamic_cast<const RegisterFile*>(
96 host_->model());
97
98 assert(rf != NULL);
99 string status = ProximConstants::MACH_WIN_RF_LABEL + rf->name();
100 return new ProximComponentStatusCmd(status);
101
102 } else if (type == Request::DETAILS_REQUEST) {
103
104 const RegisterFile* rf = dynamic_cast<const RegisterFile*>(
105 host_->model());
106
107 assert(rf != NULL);
108 return new ProximRFDetailsCmd(*rf);
109 }
110 return NULL;
111}
#define assert(condition)
TTAMachine::MachinePart * model() const
EditPart * host_
Host EditPart of this EditPolicy.
Definition EditPolicy.hh:74
static const std::string MACH_WIN_RF_LABEL
Label precing register file names in the machine state window.
virtual TCEString name() const

References assert, Request::DETAILS_REQUEST, EditPolicy::host_, ProximConstants::MACH_WIN_RF_LABEL, EditPart::model(), Request::MODIFY_REQUEST, TTAMachine::Component::name(), Request::STATUS_REQUEST, and Request::type().

Here is the call graph for this function:

The documentation for this class was generated from the following files: