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

#include <ProDeFUPortEditPolicy.hh>

Inheritance diagram for ProDeFUPortEditPolicy:
Inheritance graph
Collaboration diagram for ProDeFUPortEditPolicy:
Collaboration graph

Public Member Functions

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

ProDeFUPortEditPolicyoperator= (ProDeFUPortEditPolicy &old)
 Assignment not allowed. More...
 
 ProDeFUPortEditPolicy (ProDeFUPortEditPolicy &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 function unit 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 ProDeFUPortEditPolicy.hh.

Constructor & Destructor Documentation

◆ ProDeFUPortEditPolicy() [1/2]

ProDeFUPortEditPolicy::ProDeFUPortEditPolicy ( )

The Constructor.

Definition at line 42 of file ProDeFUPortEditPolicy.cc.

42  : EditPolicy() {
43 }

◆ ~ProDeFUPortEditPolicy()

ProDeFUPortEditPolicy::~ProDeFUPortEditPolicy ( )
virtual

The Destructor.

Definition at line 48 of file ProDeFUPortEditPolicy.cc.

48  {
49 }

◆ ProDeFUPortEditPolicy() [2/2]

ProDeFUPortEditPolicy::ProDeFUPortEditPolicy ( ProDeFUPortEditPolicy old)
private

Copying not allowed.

Member Function Documentation

◆ canHandle()

bool ProDeFUPortEditPolicy::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 74 of file ProDeFUPortEditPolicy.cc.

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

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

Here is the call graph for this function:

◆ getCommand()

ComponentCommand * ProDeFUPortEditPolicy::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 58 of file ProDeFUPortEditPolicy.cc.

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

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

Here is the call graph for this function:

◆ operator=()

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

Assignment not allowed.


The documentation for this class was generated from the following files:
Request::type
RequestType type() const
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
ModifyFUPortCmd
Definition: ModifyFUPortCmd.hh:44
Request::MODIFY_REQUEST
@ MODIFY_REQUEST
Modfify request.
Definition: Request.hh:48