Panda3D
Macros | Functions
dcast.h File Reference

PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University. More...

#include "pandabase.h"
#include "typeHandle.h"
#include "typedObject.h"
#include "config_express.h"
#include "dcast.T"

Go to the source code of this file.

Macros

#define DCAST(want_type, pointer)   _dcast((want_type*)0, pointer)
 
#define DCAST_INTO_R(to_pointer, from_pointer, return_value)
 
#define DCAST_INTO_V(to_pointer, from_pointer)
 

Functions

template<class WantType >
WantType * _dcast (WantType *, TypedObject *ptr)
 
template<class WantType >
const WantType * _dcast (WantType *, const TypedObject *ptr)
 
template<class WantType >
WantType * _dcast_ref (WantType *&, TypedObject *ptr)
 
template<class WantType >
const WantType * _dcast_ref (WantType *&, const TypedObject *ptr)
 

Detailed Description

PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.

All rights reserved.

All use of this software is subject to the terms of the revised BSD license. You should have received a copy of this license along with this source code in a file named "LICENSE."

Author
drose
Date
2001-08-06

Definition in file dcast.h.

Macro Definition Documentation

◆ DCAST_INTO_R

#define DCAST_INTO_R (   to_pointer,
  from_pointer,
  return_value 
)
Value:
{ \
(to_pointer) = _dcast_ref(to_pointer, from_pointer); \
nassertr((void *)(to_pointer) != nullptr, return_value); \
}

Definition at line 78 of file dcast.h.

◆ DCAST_INTO_V

#define DCAST_INTO_V (   to_pointer,
  from_pointer 
)
Value:
{ \
(to_pointer) = _dcast_ref(to_pointer, from_pointer); \
nassertv((void *)(to_pointer) != nullptr); \
}

Definition at line 72 of file dcast.h.