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

#include <ProDeSRPortEditPolicy.hh>

Inheritance diagram for ProDeSRPortEditPolicy:
Inheritance graph
Collaboration diagram for ProDeSRPortEditPolicy:
Collaboration graph

Public Member Functions

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

ProDeSRPortEditPolicyoperator= (ProDeSRPortEditPolicy &old)
 Assignment not allowed. More...
 
 ProDeSRPortEditPolicy (ProDeSRPortEditPolicy &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 special register 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 ProDeSRPortEditPolicy.hh.

Constructor & Destructor Documentation

◆ ProDeSRPortEditPolicy() [1/2]

ProDeSRPortEditPolicy::ProDeSRPortEditPolicy ( )

The Constructor.

Definition at line 42 of file ProDeSRPortEditPolicy.cc.

42  : EditPolicy() {
43 }

◆ ~ProDeSRPortEditPolicy()

ProDeSRPortEditPolicy::~ProDeSRPortEditPolicy ( )
virtual

The Destructor.

Definition at line 48 of file ProDeSRPortEditPolicy.cc.

48  {
49 }

◆ ProDeSRPortEditPolicy() [2/2]

ProDeSRPortEditPolicy::ProDeSRPortEditPolicy ( ProDeSRPortEditPolicy old)
private

Copying not allowed.

Member Function Documentation

◆ canHandle()

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

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

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

Here is the call graph for this function:

◆ operator=()

ProDeSRPortEditPolicy& ProDeSRPortEditPolicy::operator= ( ProDeSRPortEditPolicy 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
ModifySRPortCmd
Definition: ModifySRPortCmd.hh:44
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