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

#include <Timing.hpp>

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

Public Types

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

Public Member Functions

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

Detailed Description

Convenience class to create a Timing.

Definition at line 55 of file Timing.hpp.

Member Typedef Documentation

template<typename _Tp>
typedef SelfReferencing<Type>::Pointer torc::generic::FactoryType< _Tp >::Pointer
inherited

A pointer to an object of type Type

Definition at line 45 of file FactoryType.hpp.

template<typename _Tp>
typedef _Tp torc::generic::FactoryType< _Tp >::Type
inherited

A rename of the parameter type

Definition at line 40 of file FactoryType.hpp.

template<typename _Tp>
typedef SelfReferencing<Type>::WeakPointer torc::generic::FactoryType< _Tp >::WeakPointer
inherited

A weak pointer to an object of type Type

Definition at line 50 of file FactoryType.hpp.

Member Function Documentation

template<typename _Tp>
virtual void torc::generic::FactoryType< _Tp >::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
TimingSharedPtr torc::generic::Timing::Factory::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() 
)
throw (Error
)
virtual

Create a Timing.

Parameters
[in]inDerivationDerivation value
[in]inPathDelaysList of path delays of this timing to be appended to.
[in]inForbiddentEventsList of forbidden events to be appended to
[in]inViewPointer to parented (view) object.
[in]inInterfaceAttributesPointer to parented (InterfaceAttributes) object [optional]. If mentioned then this will decompile within (contents ...) construct.
[in]inInstancePointer to parented object(Instance) [optional]. If mentioned then this will decompile within (instance ...) construct.
Returns
Pointer to created Timing.

Definition at line 41 of file Timing.cpp.

45  {
46  try {
47  TimingSharedPtr newTiming;
48  create(newTiming);
49  newTiming->setDerivation(inDerivation);
50  newTiming->setPathDelays(inPathDelays);
51  newTiming->setForbiddentEvents(inForbiddentEvents);
52  if(inInstance) {
53  inInstance->setTiming(newTiming);
54  } else if(inInterfaceAttributes) {
55  inInterfaceAttributes->setTiming(newTiming);
56  inView->setInterfaceAttributes(inInterfaceAttributes);
57  } else {
58  inView->setTiming(newTiming);
59  }
60  return newTiming;
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< Timing > TimingSharedPtr

+ Here is the call graph for this function:


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