Panda3D
Loading...
Searching...
No Matches
Macros | Functions | Variables
register_type.h File Reference

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

#include "dtoolbase.h"
#include "typeHandle.h"
#include "typeRegistry.h"
#include "register_type.I"

Go to the source code of this file.

Macros

#define do_init_type(type)   _do_init_type((const type *)0)
 
#define get_type_handle(type)   _get_type_handle((const type *)0)
 

Functions

template<>
void _do_init_type (const bool *)
 
template<>
void _do_init_type (const bool *const *)
 
template<>
void _do_init_type (const char *)
 
template<>
void _do_init_type (const char *const *)
 
template<>
void _do_init_type (const double *)
 
template<>
void _do_init_type (const double *const *)
 
template<>
void _do_init_type (const float *)
 
template<>
void _do_init_type (const float *const *)
 
template<>
void _do_init_type (const int *)
 
template<>
void _do_init_type (const int *const *)
 
template<>
void _do_init_type (const long *)
 
template<>
void _do_init_type (const long *const *)
 
template<>
void _do_init_type (const short *)
 
template<>
void _do_init_type (const short *const *)
 
template<class T >
void _do_init_type (const T *)
 
template<>
void _do_init_type (const void *const *)
 
template<>
TypeHandle _get_type_handle (const bool *)
 
template<>
TypeHandle _get_type_handle (const bool *const *)
 
template<>
TypeHandle _get_type_handle (const char *)
 
template<>
TypeHandle _get_type_handle (const char *const *)
 
template<>
TypeHandle _get_type_handle (const double *)
 
template<>
TypeHandle _get_type_handle (const double *const *)
 
template<>
TypeHandle _get_type_handle (const float *)
 
template<>
TypeHandle _get_type_handle (const float *const *)
 
template<>
TypeHandle _get_type_handle (const int *)
 
template<>
TypeHandle _get_type_handle (const int *const *)
 
template<>
TypeHandle _get_type_handle (const long *)
 
template<>
TypeHandle _get_type_handle (const long *const *)
 
template<>
TypeHandle _get_type_handle (const short *)
 
template<>
TypeHandle _get_type_handle (const short *const *)
 
template<>
TypeHandle _get_type_handle (const std::string *)
 
template<>
TypeHandle _get_type_handle (const std::wstring *)
 
template<class T >
TypeHandle _get_type_handle (const T *)
 
template<>
TypeHandle _get_type_handle (const unsigned char *)
 
template<>
TypeHandle _get_type_handle (const unsigned int *)
 
template<>
TypeHandle _get_type_handle (const unsigned short *)
 
template<>
TypeHandle _get_type_handle (const void *const *)
 
void init_system_type_handles ()
 
TypeHandle register_dynamic_type (const std::string &name)
 This is essentially similar to register_type(), except that it doesn't store a reference to any TypeHandle passed in and it therefore doesn't complain if the type is registered more than once to different TypeHandle reference.
 
TypeHandle register_dynamic_type (const std::string &name, TypeHandle parent1)
 
TypeHandle register_dynamic_type (const std::string &name, TypeHandle parent1, TypeHandle parent2)
 
TypeHandle register_dynamic_type (const std::string &name, TypeHandle parent1, TypeHandle parent2, TypeHandle parent3)
 
TypeHandle register_dynamic_type (const std::string &name, TypeHandle parent1, TypeHandle parent2, TypeHandle parent3, TypeHandle parent4)
 
void register_type (TypeHandle &type_handle, const std::string &name)
 This inline function is just a convenient way to call TypeRegistry::register_type(), along with zero to four record_derivation()s.
 
void register_type (TypeHandle &type_handle, const std::string &name, TypeHandle parent1)
 
void register_type (TypeHandle &type_handle, const std::string &name, TypeHandle parent1, TypeHandle parent2)
 
void register_type (TypeHandle &type_handle, const std::string &name, TypeHandle parent1, TypeHandle parent2, TypeHandle parent3)
 
void register_type (TypeHandle &type_handle, const std::string &name, TypeHandle parent1, TypeHandle parent2, TypeHandle parent3, TypeHandle parent4)
 

Variables

TypeHandle bool_p_type_handle
 
TypeHandle bool_type_handle
 
TypeHandle char_p_type_handle
 
TypeHandle char_type_handle
 
TypeHandle double_p_type_handle
 
TypeHandle double_type_handle
 
TypeHandle float_p_type_handle
 
TypeHandle float_type_handle
 
TypeHandle int_p_type_handle
 
TypeHandle int_type_handle
 
TypeHandle long_p_type_handle
 
TypeHandle long_type_handle
 
TypeHandle ov_set_type_handle
 
TypeHandle pdeque_type_handle
 
TypeHandle plist_type_handle
 
TypeHandle pmap_type_handle
 
TypeHandle pset_type_handle
 
TypeHandle pvector_type_handle
 
TypeHandle short_p_type_handle
 
TypeHandle short_type_handle
 
TypeHandle string_type_handle
 
TypeHandle uchar_type_handle
 
TypeHandle uint_type_handle
 
TypeHandle ushort_type_handle
 
TypeHandle void_p_type_handle
 
TypeHandle wstring_type_handle
 

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 register_type.h.

Macro Definition Documentation

◆ do_init_type

#define do_init_type ( type)    _do_init_type((const type *)0)

Definition at line 307 of file register_type.h.

◆ get_type_handle

#define get_type_handle ( type)    _get_type_handle((const type *)0)

Definition at line 221 of file register_type.h.

Function Documentation

◆ _do_init_type() [1/16]

template<>
void _do_init_type ( const bool * )
inline

Definition at line 253 of file register_type.h.

◆ _do_init_type() [2/16]

template<>
void _do_init_type ( const bool *const * )
inline

Definition at line 288 of file register_type.h.

◆ _do_init_type() [3/16]

template<>
void _do_init_type ( const char * )
inline

Definition at line 248 of file register_type.h.

◆ _do_init_type() [4/16]

template<>
void _do_init_type ( const char *const * )
inline

Definition at line 283 of file register_type.h.

◆ _do_init_type() [5/16]

template<>
void _do_init_type ( const double * )
inline

Definition at line 258 of file register_type.h.

◆ _do_init_type() [6/16]

template<>
void _do_init_type ( const double *const * )
inline

Definition at line 293 of file register_type.h.

◆ _do_init_type() [7/16]

template<>
void _do_init_type ( const float * )
inline

Definition at line 263 of file register_type.h.

◆ _do_init_type() [8/16]

template<>
void _do_init_type ( const float *const * )
inline

Definition at line 298 of file register_type.h.

◆ _do_init_type() [9/16]

template<>
void _do_init_type ( const int * )
inline

Definition at line 238 of file register_type.h.

◆ _do_init_type() [10/16]

template<>
void _do_init_type ( const int *const * )
inline

Definition at line 273 of file register_type.h.

◆ _do_init_type() [11/16]

template<>
void _do_init_type ( const long * )
inline

Definition at line 233 of file register_type.h.

◆ _do_init_type() [12/16]

template<>
void _do_init_type ( const long *const * )
inline

Definition at line 268 of file register_type.h.

◆ _do_init_type() [13/16]

template<>
void _do_init_type ( const short * )
inline

Definition at line 243 of file register_type.h.

◆ _do_init_type() [14/16]

template<>
void _do_init_type ( const short *const * )
inline

Definition at line 278 of file register_type.h.

◆ _do_init_type() [15/16]

template<class T >
void _do_init_type ( const T * )
inline

Definition at line 228 of file register_type.h.

◆ _do_init_type() [16/16]

template<>
void _do_init_type ( const void *const * )
inline

Definition at line 303 of file register_type.h.

◆ _get_type_handle() [1/21]

template<>
TypeHandle _get_type_handle ( const bool * )
inline

Definition at line 154 of file register_type.h.

◆ _get_type_handle() [2/21]

template<>
TypeHandle _get_type_handle ( const bool *const * )
inline

Definition at line 199 of file register_type.h.

◆ _get_type_handle() [3/21]

template<>
TypeHandle _get_type_handle ( const char * )
inline

Definition at line 144 of file register_type.h.

◆ _get_type_handle() [4/21]

template<>
TypeHandle _get_type_handle ( const char *const * )
inline

Definition at line 194 of file register_type.h.

◆ _get_type_handle() [5/21]

template<>
TypeHandle _get_type_handle ( const double * )
inline

Definition at line 159 of file register_type.h.

◆ _get_type_handle() [6/21]

template<>
TypeHandle _get_type_handle ( const double *const * )
inline

Definition at line 204 of file register_type.h.

◆ _get_type_handle() [7/21]

template<>
TypeHandle _get_type_handle ( const float * )
inline

Definition at line 164 of file register_type.h.

◆ _get_type_handle() [8/21]

template<>
TypeHandle _get_type_handle ( const float *const * )
inline

Definition at line 209 of file register_type.h.

◆ _get_type_handle() [9/21]

template<>
TypeHandle _get_type_handle ( const int * )
inline

Definition at line 124 of file register_type.h.

◆ _get_type_handle() [10/21]

template<>
TypeHandle _get_type_handle ( const int *const * )
inline

Definition at line 184 of file register_type.h.

◆ _get_type_handle() [11/21]

template<>
TypeHandle _get_type_handle ( const long * )
inline

Definition at line 119 of file register_type.h.

◆ _get_type_handle() [12/21]

template<>
TypeHandle _get_type_handle ( const long *const * )
inline

Definition at line 179 of file register_type.h.

◆ _get_type_handle() [13/21]

template<>
TypeHandle _get_type_handle ( const short * )
inline

Definition at line 134 of file register_type.h.

◆ _get_type_handle() [14/21]

template<>
TypeHandle _get_type_handle ( const short *const * )
inline

Definition at line 189 of file register_type.h.

◆ _get_type_handle() [15/21]

template<>
TypeHandle _get_type_handle ( const std::string * )
inline

Definition at line 169 of file register_type.h.

◆ _get_type_handle() [16/21]

template<>
TypeHandle _get_type_handle ( const std::wstring * )
inline

Definition at line 174 of file register_type.h.

◆ _get_type_handle() [17/21]

template<class T >
TypeHandle _get_type_handle ( const T * )
inline

Definition at line 114 of file register_type.h.

◆ _get_type_handle() [18/21]

template<>
TypeHandle _get_type_handle ( const unsigned char * )
inline

Definition at line 149 of file register_type.h.

◆ _get_type_handle() [19/21]

template<>
TypeHandle _get_type_handle ( const unsigned int * )
inline

Definition at line 129 of file register_type.h.

◆ _get_type_handle() [20/21]

template<>
TypeHandle _get_type_handle ( const unsigned short * )
inline

Definition at line 139 of file register_type.h.

◆ _get_type_handle() [21/21]

template<>
TypeHandle _get_type_handle ( const void *const * )
inline

Definition at line 214 of file register_type.h.

◆ init_system_type_handles()

void init_system_type_handles ( )

Definition at line 46 of file register_type.cxx.

◆ register_dynamic_type() [1/5]

TypeHandle register_dynamic_type ( const std::string & name)
inline

This is essentially similar to register_type(), except that it doesn't store a reference to any TypeHandle passed in and it therefore doesn't complain if the type is registered more than once to different TypeHandle reference.

Definition at line 73 of file register_type.I.

References TypeRegistry::ptr(), and TypeRegistry::register_dynamic_type().

◆ register_dynamic_type() [2/5]

TypeHandle register_dynamic_type ( const std::string & name,
TypeHandle parent1 )
inline

Definition at line 77 of file register_type.I.

◆ register_dynamic_type() [3/5]

TypeHandle register_dynamic_type ( const std::string & name,
TypeHandle parent1,
TypeHandle parent2 )
inline

Definition at line 84 of file register_type.I.

◆ register_dynamic_type() [4/5]

TypeHandle register_dynamic_type ( const std::string & name,
TypeHandle parent1,
TypeHandle parent2,
TypeHandle parent3 )
inline

Definition at line 93 of file register_type.I.

◆ register_dynamic_type() [5/5]

TypeHandle register_dynamic_type ( const std::string & name,
TypeHandle parent1,
TypeHandle parent2,
TypeHandle parent3,
TypeHandle parent4 )
inline

Definition at line 104 of file register_type.I.

◆ register_type() [1/5]

void register_type ( TypeHandle & type_handle,
const std::string & name )
inline

This inline function is just a convenient way to call TypeRegistry::register_type(), along with zero to four record_derivation()s.

If for some reason you have a class that has more than four base classes (you're insane!), then you will need to call Register() and record_derivation() yourself.

Definition at line 22 of file register_type.I.

References TypeRegistry::ptr(), and TypeRegistry::register_type().

Referenced by TypedObject::init_type().

◆ register_type() [2/5]

void register_type ( TypeHandle & type_handle,
const std::string & name,
TypeHandle parent1 )
inline

Definition at line 26 of file register_type.I.

◆ register_type() [3/5]

void register_type ( TypeHandle & type_handle,
const std::string & name,
TypeHandle parent1,
TypeHandle parent2 )
inline

Definition at line 34 of file register_type.I.

◆ register_type() [4/5]

void register_type ( TypeHandle & type_handle,
const std::string & name,
TypeHandle parent1,
TypeHandle parent2,
TypeHandle parent3 )
inline

Definition at line 43 of file register_type.I.

◆ register_type() [5/5]

void register_type ( TypeHandle & type_handle,
const std::string & name,
TypeHandle parent1,
TypeHandle parent2,
TypeHandle parent3,
TypeHandle parent4 )
inline

Definition at line 54 of file register_type.I.

Variable Documentation

◆ bool_p_type_handle

TypeHandle bool_p_type_handle
extern

Definition at line 34 of file register_type.cxx.

◆ bool_type_handle

TypeHandle bool_type_handle
extern

Definition at line 24 of file register_type.cxx.

◆ char_p_type_handle

TypeHandle char_p_type_handle
extern

Definition at line 33 of file register_type.cxx.

◆ char_type_handle

TypeHandle char_type_handle
extern

Definition at line 22 of file register_type.cxx.

◆ double_p_type_handle

TypeHandle double_p_type_handle
extern

Definition at line 35 of file register_type.cxx.

◆ double_type_handle

TypeHandle double_type_handle
extern

Definition at line 25 of file register_type.cxx.

◆ float_p_type_handle

TypeHandle float_p_type_handle
extern

Definition at line 36 of file register_type.cxx.

◆ float_type_handle

TypeHandle float_type_handle
extern

Definition at line 26 of file register_type.cxx.

◆ int_p_type_handle

TypeHandle int_p_type_handle
extern

Definition at line 31 of file register_type.cxx.

◆ int_type_handle

TypeHandle int_type_handle
extern

Definition at line 18 of file register_type.cxx.

◆ long_p_type_handle

TypeHandle long_p_type_handle
extern

Definition at line 30 of file register_type.cxx.

◆ long_type_handle

TypeHandle long_type_handle
extern

Definition at line 17 of file register_type.cxx.

◆ ov_set_type_handle

TypeHandle ov_set_type_handle
extern

Definition at line 40 of file register_type.cxx.

◆ pdeque_type_handle

TypeHandle pdeque_type_handle
extern

Definition at line 41 of file register_type.cxx.

◆ plist_type_handle

TypeHandle plist_type_handle
extern

Definition at line 42 of file register_type.cxx.

◆ pmap_type_handle

TypeHandle pmap_type_handle
extern

Definition at line 43 of file register_type.cxx.

◆ pset_type_handle

TypeHandle pset_type_handle
extern

Definition at line 44 of file register_type.cxx.

◆ pvector_type_handle

TypeHandle pvector_type_handle
extern

Definition at line 39 of file register_type.cxx.

◆ short_p_type_handle

TypeHandle short_p_type_handle
extern

Definition at line 32 of file register_type.cxx.

◆ short_type_handle

TypeHandle short_type_handle
extern

Definition at line 20 of file register_type.cxx.

◆ string_type_handle

TypeHandle string_type_handle
extern

Definition at line 27 of file register_type.cxx.

◆ uchar_type_handle

TypeHandle uchar_type_handle
extern

Definition at line 23 of file register_type.cxx.

◆ uint_type_handle

TypeHandle uint_type_handle
extern

Definition at line 19 of file register_type.cxx.

◆ ushort_type_handle

TypeHandle ushort_type_handle
extern

Definition at line 21 of file register_type.cxx.

◆ void_p_type_handle

TypeHandle void_p_type_handle
extern

Definition at line 37 of file register_type.cxx.

◆ wstring_type_handle

TypeHandle wstring_type_handle
extern

Definition at line 28 of file register_type.cxx.