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

#include <ParameterArray.hpp>

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

Public Types

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

Public Member Functions

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()) throw (Error)
 
virtual ParameterArraySharedPtr newParameterArrayPtr (const std::string &inName, const std::vector< size_t > &inLimits, 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 parameter array.

Definition at line 57 of file ParameterArray.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< ParameterArray >::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
ParameterArraySharedPtr torc::generic::ParameterArray::Factory::newParameterArrayPtr ( const std::string &  inName,
const size_t &  inSize,
const ChildFactorySharedPtr inFactory = BaseVectorType::ChildFactorySharedPtr(new BaseVectorType::ChildFactory()),
const std::string &  inOriginalName = std::string() 
)
throw (Error
)
virtual

Create a parameter array.

Parameters
[in]inNameName of the parameter array to be created.
[in]inSizeSize of the instance array.
[in]inFactoryFactory for the child.
[in]inOriginalNameOriginal name of the parameter array [optional].
Returns
Pointer to created parameter array.

Create a parameter array.

Parameters
[in]inNameName of the parameter array to be created.
[in]inUnitUnit of the parameter array.
[in]inFactoryFactory for the child.
[in]inOriginalNameOriginal name of the parameter array [optional].
Returns
Pointer to created parameter array.

Definition at line 55 of file ParameterArray.cpp.

57  {
58  try {
59  std::vector < size_t > limits;
60  limits.push_back(inSize);
61  return newParameterArrayPtr(inName, limits, inFactory, inOriginalName);
62  } catch(Error& e) {
63  e.setCurrentLocation(__FUNCTION__, __FILE__, __LINE__);
64  throw;
65  }
66 }
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())

+ Here is the call graph for this function:

ParameterArraySharedPtr torc::generic::ParameterArray::Factory::newParameterArrayPtr ( const std::string &  inName,
const std::vector< size_t > &  inLimits,
const ChildFactorySharedPtr inFactory = BaseVectorType::ChildFactorySharedPtr(new BaseVectorType::ChildFactory()),
const std::string &  inOriginalName = std::string() 
)
throw (Error
)
virtual

Create a parameter array.

Parameters
[in]inNameName of the parameter array to be created.
[in]inLimitsDimensions of the vector.
[in]inFactoryFactory for the child.
[in]inOriginalNameOriginal name of the parameter array [optional].
Returns
Pointer to created parameter array.

Create a parameter array.

Parameters
[in]inNameName of the parameter array to be created.
[in]inLimitsDimensions of the vector.
[in]inValueValue of the parameter array.
[in]inUnitUnit of the parameter array.
[in]inFactoryFactory for the child.
[in]inOriginalNameOriginal name of the parameter array [optional].
Returns
Pointer to created parameter array.

Definition at line 80 of file ParameterArray.cpp.

82  {
83  try {
84  ParameterArraySharedPtr newParameterArray;
85  create(newParameterArray);
86  newParameterArray->setName(inName);
87  newParameterArray->setOriginalName(inOriginalName);
88  newParameterArray->constructChildren(inFactory, inLimits);
89  return newParameterArray;
90  } catch(Error& e) {
91  e.setCurrentLocation(__FUNCTION__, __FILE__, __LINE__);
92  throw;
93  }
94 }
boost::shared_ptr< ParameterArray > ParameterArraySharedPtr
virtual void create(Pointer &outPointer)
Definition: FactoryType.hpp:58

+ Here is the call graph for this function:


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