torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ObjectFactory.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_OBJECTFACTORY_HPP
17 #define TORC_GENERIC_OBJECTFACTORY_HPP
18 
19 #include "torc/generic/Cell.hpp"
20 #include "torc/generic/Design.hpp"
21 #include "torc/generic/Library.hpp"
24 #include "torc/generic/Root.hpp"
37 #include "torc/generic/Status.hpp"
44 #include "torc/generic/View.hpp"
45 #include "torc/generic/Written.hpp"
51 #include "torc/generic/Apply.hpp"
55 #include "torc/generic/Timing.hpp"
57 #include "torc/generic/Event.hpp"
59 
60 namespace torc {
61 namespace generic {
62 
63 /**
64  * Creates objects of different leaf types. Provides a series of create functions for creating leaf
65  * type objects. This factory is used by the parser to generate the object model. This can also be
66  * used by the clients to create inherited objects by overriding specific create methods.
67  *
68  * @note The create method should be called as: boost::shared_ptr<Port> port =
69  * factory->create<VectorPort>();
70  */
72  public Cell::Factory,
73  public Design::Factory,
74  public Library::Factory,
77  public NetBundle::Factory,
79  public PortBundle::Factory,
81  public Property::Factory,
83  public PortList::Factory,
85  public Root::Factory,
86  public ScalarNet::Factory,
87  public ScalarPort::Factory,
91  public Status::Factory,
92  public VectorNet::Factory,
93  public VectorNetBit::Factory,
94  public VectorPort::Factory,
98  public View::Factory,
99  public Written::Factory,
100  public Permutable::Factory,
102  public LogicValue::Factory,
104  public Simulate::Factory,
105  public Apply::Factory,
107  public LogicElement::Factory,
108  public WaveValue::Factory,
109  public Timing::Factory,
110  public PathDelay::Factory,
111  public Event::Factory,
113 {
114 public:
115 
116  using Cell::Factory::create;
129  using Root::Factory::create;
142  using View::Factory::create;
157 
193 
194  ObjectFactory();
195 
196  virtual ~ObjectFactory() throw();
197 
198 };
199 
200 } // namespace generic
201 } // namespace torc
202 
203 #endif // TORC_GENERIC_OBJECTFACTORY_HPP
virtual LogicalResponseSharedPtr newLogicalResponsePtr(const ResponseType &inResponseType, const PortSharedPtr &inPort, const LogicElementSharedPtr &inLogicWaveForm, const PortListAliasSharedPtr &inPortListAlias=PortListAliasSharedPtr())
virtual ScalarPortSharedPtr newScalarPortPtr(const std::string &inName, const EPortDirection &inDirection, const ViewSharedPtr &inViewPtr, const PortBundleSharedPtr &inParentCollection=PortBundleSharedPtr(), const std::string &inOriginalName=std::string())
Definition: ScalarPort.cpp:50
virtual NetBundleSharedPtr newNetBundlePtr(const std::string &inName, const ViewSharedPtr &inViewPtr, const NetBundleSharedPtr &inParentCollection=NetBundleSharedPtr(), const std::string &inOriginalName=std::string())
Definition: NetBundle.cpp:47
virtual ApplySharedPtr newApplyPtr(const int32_t &inNoOfCycle, const Value &inCycleDuration, const std::list< LogicalResponseSharedPtr > &inLogicResponces, const SimulateSharedPtr &inSimulate=SimulateSharedPtr())
Definition: Apply.cpp:34
virtual InstanceArraySharedPtr newInstanceArrayPtr(const std::string &inName, const ViewSharedPtr &inViewPtr, const ViewSharedPtr &inMaster, const size_t &inSize, const ChildFactorySharedPtr &inFactory=BaseVectorType::ChildFactorySharedPtr(new BaseVectorType::ChildFactory()), const std::string &inOriginalName=std::string())
virtual TimingSharedPtr newTimingPtr(const Derivation &inDerivation, const std::list< PathDelaySharedPtr > &inPathDelays, const std::list< ForbiddenEventSharedPtr > &inForbiddentEvents, const ViewSharedPtr &inView, const InterfaceAttributesSharedPtr &inInterfaceAttributes=InterfaceAttributesSharedPtr(), const InstanceSharedPtr &inInstance=InstanceSharedPtr())
Definition: Timing.cpp:41
virtual PermutableSharedPtr newPermutablePtr(const std::vector< PortSharedPtr > &inPorts, const ViewSharedPtr &inViewPtr, const PermutableSharedPtr &inParentPermutable=PermutableSharedPtr())
Definition: Permutable.cpp:31
virtual VectorPortReferenceSharedPtr newVectorPortReferencePtr(const InstanceSharedPtr &inInstancePtr, const PortSharedPtr &inPortPtr, const size_t &inSize, const PortBundleReferenceSharedPtr &inParentCollection=PortBundleReferenceSharedPtr(), const ChildFactorySharedPtr &inFactory=BaseType::ChildFactorySharedPtr(new BaseType::ChildFactory()))
virtual PortListSharedPtr newPortListPtr(const std::list< PortSharedPtr > &inPorts, const std::list< PortReferenceSharedPtr > &inPortReferences)
Definition: PortList.cpp:45
virtual void create(Pointer &outPointer)
Definition: FactoryType.hpp:58
virtual WaveValueSharedPtr newWaveValuePtr(const std::string &inName, const Value &inDeltaTimeDuration, const LogicElementSharedPtr inLogicWaveForm, const SimulateSharedPtr &inSimulate=SimulateSharedPtr())
Definition: WaveValue.cpp:35
virtual DesignSharedPtr newDesignPtr(const std::string &inName, const RootSharedPtr &inRootPtr, const std::string &inCellRefName, const std::string &inLibraryRefName, const std::string &inOriginalName=std::string())
virtual InterfaceJoinedInfoSharedPtr newInterfaceJoinedInfoPtr(const std::list< PortSharedPtr > &inPorts, const std::list< PortListSharedPtr > &inPortLists, const ViewSharedPtr &inViewPtr, const InterfaceJoinedInfoSharedPtr &inParentJoinedInfo=InterfaceJoinedInfoSharedPtr())
virtual RootSharedPtr newRootPtr(const std::string &inName, const EdifLevel &inEdifLevel=eEdifLevel0, const std::string &inOriginalName=std::string())
Definition: Root.cpp:211
virtual VectorPortSharedPtr newVectorPortPtr(const std::string &inName, const EPortDirection &inDirection, const ViewSharedPtr &inViewPtr, const size_t &inSize, const PortBundleSharedPtr &inParentCollection=PortBundleSharedPtr(), const ChildFactorySharedPtr &inFactory=BaseVectorType::ChildFactorySharedPtr(new BaseVectorType::ChildFactory()), const std::string &inOriginalName=std::string())
Definition: VectorPort.cpp:54
virtual ParameterArraySharedPtr newParameterArrayPtr(const std::string &inName, const size_t &inSize, const ChildFactorySharedPtr &inFactory=BaseVectorType::ChildFactorySharedPtr(new BaseVectorType::ChildFactory()), const std::string &inOriginalName=std::string())
virtual SingleInstanceSharedPtr newSingleInstancePtr(const std::string &inName, const ViewSharedPtr &inViewPtr, const ViewSharedPtr &inMasterPtr, const std::string &inOriginalName=std::string())
virtual LogicValueSharedPtr newLogicValuePtr(const std::string &inName, const LogicValueAttributesSharedPtr &inAttributes, const std::string &inOriginalName=std::string(), const SimulationInfoSharedPtr &inSimulationInfo=SimulationInfoSharedPtr())
Definition: LogicValue.cpp:34
virtual ScalarNetSharedPtr newScalarNetPtr(const std::string &inName, const ViewSharedPtr &inViewPtr, const NetBundleSharedPtr &inParentCollection=NetBundleSharedPtr(), const std::string &inOriginalName=std::string())
Definition: ScalarNet.cpp:45
virtual CellSharedPtr newCellPtr(const std::string &inName, const LibrarySharedPtr &inLibraryPtr, const Cell::Type &inCellType=Cell::eTypeGeneric, const std::string &inOriginalName=std::string())
Definition: Cell.cpp:63
virtual SimulateSharedPtr newSimulatePtr(const std::string &inName, const std::vector< PortListAliasSharedPtr > &inPortListAliases, const std::vector< ApplySharedPtr > &inAllApply, const std::vector< WaveValueSharedPtr > &inWaveValues, const ViewSharedPtr &inView, const std::string &inOriginalName=std::string(), const InterfaceAttributesSharedPtr &inInterfaceAttributes=InterfaceAttributesSharedPtr())
Definition: Simulate.cpp:40
virtual ScalarPortReferenceSharedPtr newScalarPortReferencePtr(const InstanceSharedPtr &inInstancePtr, const PortSharedPtr &inPortPtr, const PortBundleReferenceSharedPtr &inParentCollection=PortBundleReferenceSharedPtr())
virtual LibrarySharedPtr newLibraryPtr(const std::string &inName, const RootSharedPtr &inRootPtr, const EdifLevel &inEdifLevel=eEdifLevel0, const std::string &inOriginalName=std::string())
Definition: Library.cpp:71
virtual WrittenSharedPtr newWrittenPtr(const TimeStamp &inTimeStamp, const StatusSharedPtr &inStatusPtr, const std::string &inAuthorName=std::string(), const std::string &inProgramName=std::string(), const std::string &inProgramVersion=std::string(), const std::string &inDataOriginLocName=std::string(), const std::string &inDataOriginVersion=std::string())
Definition: Written.cpp:35
virtual StatusSharedPtr newStatusPtr(const StatusContainerSharedPtr &inContainer)
Definition: Status.cpp:28
virtual LogicElementSharedPtr newLogicElementPtr(const LogicElement::Type &inType, const LogicValueSharedPtr &inLogicValue=LogicValueSharedPtr(), const LogicElementSharedPtr &inParentLogicElement=LogicElementSharedPtr())
virtual PortBundleSharedPtr newPortBundlePtr(const std::string &inName, const ViewSharedPtr &inViewPtr, const PortBundleSharedPtr &inParentCollection=PortBundleSharedPtr(), const std::string &inOriginalName=std::string())
Definition: PortBundle.cpp:156
virtual PathDelaySharedPtr newPathDelayPtr(const Value::MiNoMax &inDelay, const std::list< EventSharedPtr > &inEvents, const TimingSharedPtr &inTiming=TimingSharedPtr())
Definition: PathDelay.cpp:33
virtual ForbiddenEventSharedPtr newForbiddenEventPtr(const EventSharedPtr &inStartTimeInterval, const EventSharedPtr &inEndTimeInterval, const std::list< EventSharedPtr > &inEvents, const TimingSharedPtr &inTiming=TimingSharedPtr(), const Value &inDuration=Value())
virtual EventSharedPtr newEventPtr(const Event::Type &inEventType, const std::list< PortSharedPtr > &inPorts, const std::list< PortReferenceSharedPtr > &inPortReferences, const std::list< NetSharedPtr > &inNets, const LogicElementSharedPtr &inTransition=LogicElementSharedPtr(), const PortListSharedPtr &inPortList=PortListSharedPtr(), const Value &inOffsetTime=Value())
Definition: Event.cpp:38
virtual SimulationInfoSharedPtr newSimulationInfoPtr(const std::vector< LogicValueSharedPtr > &inLogicValues, const LibrarySharedPtr &inLibraryPtr)
virtual SingleParameterSharedPtr newSingleParameterPtr(const std::string &inName, const Value &inValue, const Unit &inUnit=eUnitUndefined, const std::string &inOriginalName=std::string())
virtual PropertySharedPtr newPropertyPtr(const std::string &inName, const PropertyContainerSharedPtr &inContainer, const Value &inValue, const Unit &inUnit=eUnitUndefined, const PropertySharedPtr &inParentProperty=PropertySharedPtr(), const std::string &inOriginalName=std::string())
Definition: Property.hpp:228
A placeholder for a factory method.
Definition: FactoryType.hpp:35
virtual VectorNetSharedPtr newVectorNetPtr(const std::string &inName, const ViewSharedPtr &inViewPtr, const size_t &inSize, const NetBundleSharedPtr &inParentCollection=NetBundleSharedPtr(), const ChildFactorySharedPtr &inFactory=BaseVectorType::ChildFactorySharedPtr(new BaseVectorType::ChildFactory()), const std::string &inOriginalName=std::string())
Definition: VectorNet.cpp:49
virtual ViewSharedPtr newViewPtr(const std::string &inName, const CellSharedPtr &inCellPtr, const View::Type &inViewType=View::eTypeNetlist, const std::string &inOriginalName=std::string())
Definition: View.cpp:72
virtual PortBundleReferenceSharedPtr newPortBundleReferencePtr(const InstanceSharedPtr &inInstancePtr, const PortSharedPtr &inPortPtr, const ObjectFactorySharedPtr &inFactory, const PortBundleReferenceSharedPtr &inParentCollection=PortBundleReferenceSharedPtr())