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

#include <VectorNet.hpp>

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

Public Types

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

Public Member Functions

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()) throw (Error)
 
virtual VectorNetSharedPtr newVectorNetPtr (const std::string &inName, const ViewSharedPtr &inViewPtr, const std::vector< size_t > &inLimits, const NetBundleSharedPtr &inParentCollection=NetBundleSharedPtr(), const ChildFactorySharedPtr &inFactory=BaseVectorType::ChildFactorySharedPtr(new BaseVectorType::ChildFactory()), const std::string &inOriginalName=std::string()) throw (Error)
 
virtual void create (Pointer &outPointer) throw (Error)
 

Detailed Description

Convenience class to create a vector net.

Definition at line 55 of file VectorNet.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< VectorNet >::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
VectorNetSharedPtr torc::generic::VectorNet::Factory::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() 
)
throw (Error
)
virtual

Create a vector net.

Parameters
[in]inNameName of the vector net to be created.
[in]inViewPtrPointer to parented(View) object.
[in]inSizeSize of the net array.
[in]inParentCollectionPointer to parent bundle.
[in]inFactoryFactory for the child.
[in]inOriginalNameOriginal name of the vector net [optional].
Returns
Pointer to created vector net.

Create a vector net.

Parameters
[in]inNameName of the vector net to be created.
[in]inViewPtrPointer to parented(View) object.
[in]inSizeSize of the net array.
[in]inFactoryFactory for the child.
[in]inOriginalNameOriginal name of the vector net [optional].
Returns
Pointer to created vector net.

Definition at line 49 of file VectorNet.cpp.

52  {
53  try {
54  std::vector < size_t > limits;
55  limits.push_back(inSize);
56  return newVectorNetPtr(inName, inViewPtr, limits, inParentCollection, inFactory,
57  inOriginalName);
58  } catch(Error& e) {
59  e.setCurrentLocation(__FUNCTION__, __FILE__, __LINE__);
60  throw;
61  }
62 }
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

+ Here is the call graph for this function:

VectorNetSharedPtr torc::generic::VectorNet::Factory::newVectorNetPtr ( const std::string &  inName,
const ViewSharedPtr inViewPtr,
const std::vector< size_t > &  inLimits,
const NetBundleSharedPtr inParentCollection = NetBundleSharedPtr(),
const ChildFactorySharedPtr inFactory = BaseVectorType::ChildFactorySharedPtr(new BaseVectorType::ChildFactory()),
const std::string &  inOriginalName = std::string() 
)
throw (Error
)
virtual

Create a vector net.

Parameters
[in]inNameName of the vector net to be created.
[in]inViewPtrPointer to parented(View) object.
[in]inLimitsDimensions of the vector.
[in]inParentCollectionPointer to parent bundle.
[in]inFactoryFactory for the child.
[in]inOriginalNameOriginal name of the vector net [optional].
Returns
Pointer to created vector net.

Create a vector net.

Parameters
[in]inNameName of the vector net to be created.
[in]inViewPtrPointer to parented(View) object.
[in]inLimitsDimensions of the vector.
[in]inFactoryFactory for the child.
[in]inOriginalNameOriginal name of the vector net [optional].
Returns
Pointer to created vector net.

Definition at line 75 of file VectorNet.cpp.

78  {
79  try {
80  VectorNetSharedPtr newVectorNet;
81  create(newVectorNet);
82  newVectorNet->setName(inName);
83  newVectorNet->constructChildren(inFactory, inLimits);
84  newVectorNet->setOriginalName(inOriginalName);
85  if(inParentCollection) {
86  inParentCollection->addChild(newVectorNet);
87  } else {
88  inViewPtr->addNet(newVectorNet);
89  }
90  return newVectorNet;
91  } catch(Error& e) {
92  e.setCurrentLocation(__FUNCTION__, __FILE__, __LINE__);
93  throw;
94  }
95 }
virtual void create(Pointer &outPointer)
Definition: FactoryType.hpp:58
boost::shared_ptr< VectorNet > VectorNetSharedPtr

+ Here is the call graph for this function:


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