Macros
declare_ptr.h File Reference
#include <memory>
Include dependency graph for declare_ptr.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MOVEIT_DECLARE_PTR(Name, Type)
 
#define MOVEIT_DECLARE_PTR_MEMBER(Type)
 

Macro Definition Documentation

◆ MOVEIT_DECLARE_PTR

#define MOVEIT_DECLARE_PTR (   Name,
  Type 
)
Value:
typedef std::shared_ptr<Type> Name##Ptr; \
typedef std::shared_ptr<const Type> Name##ConstPtr; \
typedef std::weak_ptr<Type> Name##WeakPtr; \
typedef std::weak_ptr<const Type> Name##ConstWeakPtr; \
typedef std::unique_ptr<Type> Name##UniquePtr; \
typedef std::unique_ptr<const Type> Name##ConstUniquePtr

Macro that given a Name and a Type declares the following types:

  • ${Name}Ptr = shared_ptr<${Type}>
  • ${Name}ConstPtr = shared_ptr<const ${Type}>
  • ${Name}WeakPtr = weak_ptr<${Type}>
  • ${Name}ConstWeakPtr = weak_ptr<const ${Type}>
  • ${Name}UniquePtr = unique_ptr<${Type}>
  • ${Name}ConstUniquePtr = unique_ptr<const ${Type}>

For best portability the exact type of shared_ptr declared by the macro should be considered to be an implementation detail, liable to change in future releases.

Definition at line 54 of file declare_ptr.h.

◆ MOVEIT_DECLARE_PTR_MEMBER

#define MOVEIT_DECLARE_PTR_MEMBER (   Type)
Value:
typedef std::shared_ptr<Type> Ptr; \
typedef std::shared_ptr<const Type> ConstPtr; \
typedef std::weak_ptr<Type> WeakPtr; \
typedef std::weak_ptr<const Type> ConstWeakPtr; \
typedef std::unique_ptr<Type> UniquePtr; \
typedef std::unique_ptr<const Type> ConstUniquePtr

The macro defines the same typedefs as MOVEIT_DECLARE_PTR, but shortens the new names to their suffix.

This can be used to create Classname::Ptr style names, but in most situations in MoveIt's codebase, MOVEIT_CLASS_FORWARD and MOVEIT_DECLARE_PTR should be preferred.

Definition at line 70 of file declare_ptr.h.



moveit_core
Author(s): Ioan Sucan , Sachin Chitta , Acorn Pooley
autogenerated on Thu Nov 21 2024 03:23:42