torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PrimitiveConn.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 /// \file
17 /// \brief Header for the PrimitiveConn class.
18 
19 #ifndef TORC_ARCHITECTURE_PRIMITIVECONN_HPP
20 #define TORC_ARCHITECTURE_PRIMITIVECONN_HPP
21 
23 
24 namespace torc {
25 namespace architecture {
26 
27  namespace architecture { class PrimitiveConnUnitTest; }
28 
29  /// \brief Encapsulation of a PrimitiveDef internal connection.
30  /// \detail This class is analogous to a permanent net with one and only source pin. All
31  /// PrimitiveConn objects are initialized from a family database by the Sites class.
32  class PrimitiveConn {
33  protected:
34  // friends
35  /// \brief The Sites class has access to our internals.
36  friend class Sites;
37  /// \brief Our unit test class has access to our internals.
39  // members
40  /// \brief Pointer to the source primitive element pin.
42  /// \brief Vector of pointers to the sink primitive element pins.
44  public:
45  // accessors
46  /// \brief Returns a pointer to the source primitive element pin.
47  const PrimitiveElementPin* getSourcePtr(void) const { return mSourcePtr; }
48  /// \brief Returns a vector of pointers to the sink primitive element pins.
49  const PrimitiveElementPinPtrVector& getSinks(void) const { return mSinks; }
50  };
51 
52  /// \brief Array of shared pointers to PrimitiveConn objects.
54 
55 } // namespace architecture
56 } // namespace torc
57 
58 #endif // TORC_ARCHITECTURE_PRIMITIVECONN_HPP
const PrimitiveElementPin * mSourcePtr
Pointer to the source primitive element pin.
const PrimitiveElementPinPtrVector & getSinks(void) const
Returns a vector of pointers to the sink primitive element pins.
Array< PrimitiveConnSharedPtr > PrimitiveConnSharedPtrArray
Array of shared pointers to PrimitiveConn objects.
const PrimitiveElementPin * getSourcePtr(void) const
Returns a pointer to the source primitive element pin.
PrimitiveElementPinPtrVector mSinks
Vector of pointers to the sink primitive element pins.
Site type and population data for the family and the device.
Definition: Sites.hpp:45
Encapsulation of a PrimitiveDef internal connection. This class is analogous to a permanent net with...
Encapsulation of a primitive element pin's name, flags, and element pointer. Primitive element pins ...
std::vector< const PrimitiveElementPin * > PrimitiveElementPinPtrVector
Vector of constant PrimitiveElementPin pointers.
Header for the PrimitiveElementPin class.
friend class torc::architecture::architecture::PrimitiveConnUnitTest
Our unit test class has access to our internals.