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

#include <ProDeIUPortEditPolicy.hh>

Inheritance diagram for ProDeIUPortEditPolicy:
Inheritance graph
Collaboration diagram for ProDeIUPortEditPolicy:
Collaboration graph

Public Member Functions

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

ProDeIUPortEditPolicyoperator= (ProDeIUPortEditPolicy &old)
 Assignment not allowed. More...
 
 ProDeIUPortEditPolicy (ProDeIUPortEditPolicy &old)
 Copying not allowed. More...
 

Additional Inherited Members

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

Detailed Description

Determines how an immediate 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 ProDeIUPortEditPolicy.hh.

Constructor & Destructor Documentation

◆ ProDeIUPortEditPolicy() [1/2]

ProDeIUPortEditPolicy::ProDeIUPortEditPolicy ( )

The Constructor.

Definition at line 43 of file ProDeIUPortEditPolicy.cc.

43  : EditPolicy() {
44 }

◆ ~ProDeIUPortEditPolicy()

ProDeIUPortEditPolicy::~ProDeIUPortEditPolicy ( )
virtual

The Destructor.

Definition at line 49 of file ProDeIUPortEditPolicy.cc.

49  {
50 }

◆ ProDeIUPortEditPolicy() [2/2]

ProDeIUPortEditPolicy::ProDeIUPortEditPolicy ( ProDeIUPortEditPolicy old)
private

Copying not allowed.

Member Function Documentation

◆ canHandle()

bool ProDeIUPortEditPolicy::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 ProDeIUPortEditPolicy.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 * ProDeIUPortEditPolicy::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 ProDeIUPortEditPolicy.cc.

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

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

Here is the call graph for this function:

◆ operator=()

ProDeIUPortEditPolicy& ProDeIUPortEditPolicy::operator= ( ProDeIUPortEditPolicy 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
ModifyIUPortCmd
Definition: ModifyIUPortCmd.hh:44
Request::MODIFY_REQUEST
@ MODIFY_REQUEST
Modfify request.
Definition: Request.hh:48