OpenASIP  2.0
Public Member Functions | Private Member Functions | List of all members
ProDeRFPortEditPolicy Class Reference

#include <ProDeRFPortEditPolicy.hh>

Inheritance diagram for ProDeRFPortEditPolicy:
Inheritance graph
Collaboration diagram for ProDeRFPortEditPolicy:
Collaboration graph

Public Member Functions

 ProDeRFPortEditPolicy ()
 
virtual ~ProDeRFPortEditPolicy ()
 
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)
 

Private Member Functions

ProDeRFPortEditPolicyoperator= (ProDeRFPortEditPolicy &old)
 Assignment not allowed. More...
 
 ProDeRFPortEditPolicy (ProDeRFPortEditPolicy &old)
 Copying not allowed. More...
 

Additional Inherited Members

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

Detailed Description

Determines how a register file port EditPart acts when a Request is performed on it.

Converts a given Request to a Command if the EditPolicy supports the Request.

Definition at line 48 of file ProDeRFPortEditPolicy.hh.

Constructor & Destructor Documentation

◆ ProDeRFPortEditPolicy() [1/2]

ProDeRFPortEditPolicy::ProDeRFPortEditPolicy ( )

The Constructor.

Definition at line 43 of file ProDeRFPortEditPolicy.cc.

43  : EditPolicy() {
44 }

◆ ~ProDeRFPortEditPolicy()

ProDeRFPortEditPolicy::~ProDeRFPortEditPolicy ( )
virtual

The Destructor.

Definition at line 49 of file ProDeRFPortEditPolicy.cc.

49  {
50 }

◆ ProDeRFPortEditPolicy() [2/2]

ProDeRFPortEditPolicy::ProDeRFPortEditPolicy ( ProDeRFPortEditPolicy old)
private

Copying not allowed.

Member Function Documentation

◆ canHandle()

bool ProDeRFPortEditPolicy::canHandle ( Request request) const
virtual

Tells whether this EditPolicy is able to handle a certain type of Request.

Parameters
requestRequest to be asked if it can be handled.
Returns
True if the Request can be handled, false otherwise.

Implements EditPolicy.

Definition at line 75 of file ProDeRFPortEditPolicy.cc.

75  {
76  Request::RequestType type = request->type();
77  if (type == Request::MODIFY_REQUEST) {
78  return true;
79  } else {
80  return false;
81  }
82 }

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

Here is the call graph for this function:

◆ getCommand()

ComponentCommand * ProDeRFPortEditPolicy::getCommand ( Request request)
virtual

Returns the Command corresponding to the type of the Request.

Parameters
requestRequest to be handled.
Returns
NULL if the Request cannot be handled.

Implements EditPolicy.

Definition at line 59 of file ProDeRFPortEditPolicy.cc.

59  {
60  Request::RequestType type = request->type();
61  if (type == Request::MODIFY_REQUEST) {
62  return new ModifyRFPortCmd(host_);
63  }
64  return NULL;
65 }

References EditPolicy::host_, Request::MODIFY_REQUEST, and Request::type().

Here is the call graph for this function:

◆ operator=()

ProDeRFPortEditPolicy& ProDeRFPortEditPolicy::operator= ( ProDeRFPortEditPolicy old)
private

Assignment not allowed.


The documentation for this class was generated from the following files:
Request::type
RequestType type() const
ModifyRFPortCmd
Definition: ModifyRFPortCmd.hh:44
EditPolicy::host_
EditPart * host_
Host EditPart of this EditPolicy.
Definition: EditPolicy.hh:74
EditPolicy::EditPolicy
EditPolicy()
Definition: EditPolicy.cc:41
Request::RequestType
RequestType
Data type for determining the type of a Request.
Definition: Request.hh:46
Request::MODIFY_REQUEST
@ MODIFY_REQUEST
Modfify request.
Definition: Request.hh:48