torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
torc::generic::Simulate::Factory Class Reference

#include <Simulate.hpp>

+ Inheritance diagram for torc::generic::Simulate::Factory:
+ Collaboration diagram for torc::generic::Simulate::Factory:

Public Types

typedef Simulate Type
 
typedef SelfReferencing< Type >
::Pointer 
Pointer
 
typedef SelfReferencing< Type >
::WeakPointer 
WeakPointer
 

Public Member Functions

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()) throw (Error)
 
virtual void create (Pointer &outPointer) throw (Error)
 

Detailed Description

Convenience class for creating a simulate

Definition at line 59 of file Simulate.hpp.

Member Typedef Documentation

A pointer to an object of type Type

Definition at line 45 of file FactoryType.hpp.

A rename of the parameter type

Definition at line 40 of file FactoryType.hpp.

A weak pointer to an object of type Type

Definition at line 50 of file FactoryType.hpp.

Member Function Documentation

virtual void torc::generic::FactoryType< Simulate >::create ( Pointer outPointer)
throw (Error
)
inlinevirtualinherited

Create an object of the Type specification of Factory. If the object has a boost::weak_ptr to itself, it is the task of this method to set this after the object is created.

Returns
A pointer to the freshly created object.

Definition at line 58 of file FactoryType.hpp.

58  {
59  try {
60  Pointer temp(new _Tp()); //Do not remove
61  outPointer = temp;
62  WeakPointer weakPtr(outPointer);
63  outPointer->setWeakThis(weakPtr);
64  } catch(std::exception& e) //May receive std::bad_alloc
65  {
66  //TBD::ERROR
67  }
68  }
SelfReferencing< Type >::WeakPointer WeakPointer
Definition: FactoryType.hpp:50
SelfReferencing< Type >::Pointer Pointer
Definition: FactoryType.hpp:45
SimulateSharedPtr torc::generic::Simulate::Factory::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() 
)
throw (Error
)
virtual

Create a simulate.

Parameters
[in]inNameName of the simulate to be created.
[in]inPortListAliasesVector of port list aliases to this simulate.
[in]inAllApplyVector of apply to this simulate.
[in]inWaveValuesVector of WaveValues to this simulate.
[in]inViewPointer to parented (view) object.
[in]inOriginalNameOriginal name of the simulate [optional].
[in]inInterfaceAttributesPointer to parented (InterfaceAttributes) object [optional]. If mentioned then this will decompile within (contents ...) construct.
Returns
Pointer to created simulate.

Definition at line 40 of file Simulate.cpp.

45  {
46  try {
47  SimulateSharedPtr newSimulate;
48  create(newSimulate);
49  newSimulate->setName(inName);
50  newSimulate->setPortListAliases(inPortListAliases);
51  newSimulate->setAllApply(inAllApply);
52  newSimulate->setWaveValues(inWaveValues);
53  newSimulate->setOriginalName(inOriginalName);
54  if(inInterfaceAttributes) {
55  inInterfaceAttributes->setSimulate(newSimulate);
56  inView->setInterfaceAttributes(inInterfaceAttributes);
57  } else {
58  inView->setSimulate(newSimulate);
59  }
60  return newSimulate;
61  } catch(Error& e) {
62  e.setCurrentLocation(__FUNCTION__, __FILE__, __LINE__);
63  throw;
64  }
65 }
virtual void create(Pointer &outPointer)
Definition: FactoryType.hpp:58
boost::shared_ptr< Simulate > SimulateSharedPtr

+ Here is the call graph for this function:


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