My Project
Public Member Functions | List of all members
PortBase Class Referenceabstract

#include <portbase.hpp>

Inheritance diagram for PortBase:
Port

Public Member Functions

virtual FIFO & operator[] (const std::string &&port_name)=0
 
virtual bool hasPorts ()=0
 
virtual PortIterator begin ()=0
 
virtual PortIterator end ()=0
 

Detailed Description

portbase.hpp - Interface for port types. Ensures that all port sub-classes have at least the functions listed below.

Author
: Jonathan Beard
Version
: Sun Nov 30 10:22:46 2014

Copyright 2014 Jonathan Beard

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at:

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Member Function Documentation

virtual PortIterator PortBase::begin ( )
pure virtual

begin - returns a forward iterator to the port list, implementations should be thread safe so that auto- parallelized code can function properly.

Returns
PortIterator - points to first port, not in alphabetical or necessarily any order.

Implemented in Port.

virtual PortIterator PortBase::end ( )
pure virtual

end - returns one past the end of the iterator, should be suitable for usage in a for( xxx : xxx ) loop just as in any other meaningful usage of a forward iterator.

Returns
PortIterator - points to one past the last port.

Implemented in Port.

virtual bool PortBase::hasPorts ( )
pure virtual

hasPorts - should return false if this port object is empty.

Returns
bool - true if no ports

Implemented in Port.

virtual FIFO& PortBase::operator[] ( const std::string &&  port_name)
pure virtual

operator[] - enables lookup of ports by name, which in turn enables the user to name each port something that is telling of the underlying function.

Parameters
port_name- name of the port you wish to get
Returns
FIFO&
Exceptions
-should throw a PortNotFoundException if port_name doesn't exist.

Implemented in Port.


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