14#ifndef FACTORYPARAMS_H
15#define FACTORYPARAMS_H
36class EXPCL_PANDA_PUTIL FactoryParams {
38 FactoryParams() =
default;
39 FactoryParams(
const FactoryParams ©) =
default;
40 FactoryParams(FactoryParams &&from)
noexcept =
default;
41 ~FactoryParams() =
default;
43 FactoryParams &operator = (FactoryParams &&from)
noexcept =
default;
59 void *_user_data =
nullptr;
61 friend class FactoryBase;
64template<
class ParamType>
The base class of any number of specific pieces of parameter information that might be passed to a Fa...
An instance of this class is passed to the Factory when requesting it to do its business and construc...
int get_num_params() const
Returns the number of parameters that have been added to the set.
FactoryParam * get_param(int n) const
Returns the nth parameter that has been added to the set.
void clear()
Removes all parameters from the set.
void * get_user_data() const
Returns the custom pointer that was associated with the factory function.
FactoryParam * get_param_of_type(TypeHandle type) const
Returns the first parameter that matches exactly the indicated type, or if there are no exact matches...
TypeHandle is the identifier used to differentiate C++ class types.
A base class for things which need to inherit from both TypedObject and from ReferenceCount.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
bool get_param_into(ParamType *&pointer, const FactoryParams ¶ms)
A handy convenience template function that extracts a parameter of the indicated type from the Factor...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.