torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
VectorPortBitReference.hpp
Go to the documentation of this file.
1 // Torc - Copyright 2011-2013 University of Southern California. All Rights Reserved.
2 // $HeadURL$
3 // $Id$
4 
5 // This program is free software: you can redistribute it and/or modify it under the terms of the
6 // GNU General Public License as published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
10 // without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
11 // the GNU General Public License for more details.
12 //
13 // You should have received a copy of the GNU General Public License along with this program. If
14 // not, see <http://www.gnu.org/licenses/>.
15 
16 #ifndef TORC_GENERIC_VECTORPORTBITREFERENCE_HPP
17 #define TORC_GENERIC_VECTORPORTBITREFERENCE_HPP
18 
20 
21 //BOOST
22 #ifdef GENOM_SERIALIZATION
23 #include <boost/serialization/access.hpp>
24 #endif //GENOM_SERIALIZATION
29 #include "torc/generic/Error.hpp"
30 
31 namespace torc { namespace generic { class BaseVisitor; } }
32 
33 namespace torc {
34 namespace generic {
35 
36 /**
37  * @brief Represents a reference to a bit of a port.
38  *
39  * The VectorPortBitReference class represents a reference to a bit of an array port.
40  */
41 class VectorPortBitReference : public PortReference, public VectorBit<PortReference> {
42 #ifdef GENOM_SERIALIZATION
43  friend class boost::serialization::access;
44 #endif //GENOM_SERIALIZATION
45 public:
48 
49  virtual void accept(BaseVisitor& inoutVisitor) throw (Error);
50 
51  virtual Connection connect(const NetSharedPtr& inNet) throw (Error);
52 
54 
55  virtual void disconnect(const Connection& inConnection) throw (Error);
56 
57  virtual void getConnectedNets(std::vector<NetSharedPtr>& outNets,
58  bool inSkipChildConnections = false) const throw (Error);
59 
61  virtual ~VectorPortBitReference() throw ();
62 
63 private:
64 #ifdef GENOM_SERIALIZATION
65  template <class Archive> void
66  serialize(Archive& ar, unsigned int);
67 #endif //GENOM_SERIALIZATION
68 };
69 
70 } // namespace generic
71 } // namespace torc
72 
73 #endif // TORC_GENERIC_VECTORPORTBITREFERENCE_HPP
An acyclic inoutVisitor implementation.
Definition: VisitorType.hpp:57
Represents the usable instance of a port of a cell in another cell.
FactoryType< VectorPortBitReference > Factory
std::list< NetSharedPtr >::iterator Connection
Definition: Connectable.hpp:52
The Error object thrown by different methods of EdifOM.
Definition: Error.hpp:41
boost::shared_ptr< Net > NetSharedPtr
A base class for Visitor.
Definition: VisitorType.hpp:31
virtual Connection connect(const NetSharedPtr &inNet)
Represents a reference to a bit of a port.
VisitorType< VectorPortBitReference > Visitor
virtual void accept(BaseVisitor &inoutVisitor)
A placeholder for a factory method.
Definition: FactoryType.hpp:35
virtual void getConnectedNets(std::vector< NetSharedPtr > &outNets, bool inSkipChildConnections=false) const
Represents a single element of a vector composition.
Definition: VectorBit.hpp:41