mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
const downcast methods
This commit is contained in:
parent
7fbec02238
commit
52b632fac8
@ -97,6 +97,16 @@ as_array_parameter() {
|
||||
return this;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DCArrayParameter::as_array_parameter
|
||||
// Access: Published, Virtual
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
const DCArrayParameter *DCArrayParameter::
|
||||
as_array_parameter() const {
|
||||
return this;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DCArrayParameter::make_copy
|
||||
// Access: Published, Virtual
|
||||
|
@ -39,6 +39,7 @@ public:
|
||||
|
||||
PUBLISHED:
|
||||
virtual DCArrayParameter *as_array_parameter();
|
||||
virtual const DCArrayParameter *as_array_parameter() const;
|
||||
virtual DCParameter *make_copy() const;
|
||||
virtual bool is_valid() const;
|
||||
|
||||
|
@ -59,6 +59,18 @@ as_atomic_field() {
|
||||
return this;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DCAtomicField::as_atomic_field
|
||||
// Access: Published, Virtual
|
||||
// Description: Returns the same field pointer converted to an atomic
|
||||
// field pointer, if this is in fact an atomic field;
|
||||
// otherwise, returns NULL.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
const DCAtomicField *DCAtomicField::
|
||||
as_atomic_field() const {
|
||||
return this;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DCAtomicField::get_num_elements
|
||||
// Access: Published
|
||||
|
@ -42,6 +42,7 @@ public:
|
||||
|
||||
PUBLISHED:
|
||||
virtual DCAtomicField *as_atomic_field();
|
||||
virtual const DCAtomicField *as_atomic_field() const;
|
||||
|
||||
int get_num_elements() const;
|
||||
DCParameter *get_element(int n) const;
|
||||
|
@ -74,6 +74,16 @@ as_class() {
|
||||
return this;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DCClass::as_class
|
||||
// Access: Published, Virtual
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
const DCClass *DCClass::
|
||||
as_class() const {
|
||||
return this;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DCClass::get_name
|
||||
// Access: Published
|
||||
@ -465,7 +475,7 @@ direct_update(PyObject *distobj, const string &field_name,
|
||||
bool DCClass::
|
||||
pack_required_field(DCPacker &packer, PyObject *distobj,
|
||||
const DCField *field) const {
|
||||
const DCParameter *parameter = ((DCField *)field)->as_parameter();
|
||||
const DCParameter *parameter = field->as_parameter();
|
||||
if (parameter != (DCParameter *)NULL) {
|
||||
// This is the easy case: to pack a parameter, we just look on the
|
||||
// class object for the data element.
|
||||
@ -490,7 +500,7 @@ pack_required_field(DCPacker &packer, PyObject *distobj,
|
||||
return pack_ok;
|
||||
}
|
||||
|
||||
const DCAtomicField *atom = ((DCField *)field)->as_atomic_field();
|
||||
const DCAtomicField *atom = field->as_atomic_field();
|
||||
if (atom == (DCAtomicField *)NULL) {
|
||||
ostringstream strm;
|
||||
strm << "Cannot pack non-atomic field " << field->get_name()
|
||||
|
@ -39,6 +39,7 @@ public:
|
||||
|
||||
PUBLISHED:
|
||||
virtual DCClass *as_class();
|
||||
virtual const DCClass *as_class() const;
|
||||
|
||||
const string &get_name() const;
|
||||
int get_number() const;
|
||||
|
@ -92,6 +92,16 @@ as_class_parameter() {
|
||||
return this;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DCClassParameter::as_class_parameter
|
||||
// Access: Published, Virtual
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
const DCClassParameter *DCClassParameter::
|
||||
as_class_parameter() const {
|
||||
return this;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DCClassParameter::make_copy
|
||||
// Access: Published, Virtual
|
||||
|
@ -37,6 +37,7 @@ public:
|
||||
|
||||
PUBLISHED:
|
||||
virtual DCClassParameter *as_class_parameter();
|
||||
virtual const DCClassParameter *as_class_parameter() const;
|
||||
virtual DCParameter *make_copy() const;
|
||||
virtual bool is_valid() const;
|
||||
|
||||
|
@ -38,6 +38,16 @@ as_class() {
|
||||
return (DCClass *)NULL;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DCDeclaration::as_class
|
||||
// Access: Published, Virtual
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
const DCClass *DCDeclaration::
|
||||
as_class() const {
|
||||
return (DCClass *)NULL;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DCDeclaration::as_switch
|
||||
// Access: Published, Virtual
|
||||
@ -47,3 +57,13 @@ DCSwitch *DCDeclaration::
|
||||
as_switch() {
|
||||
return (DCSwitch *)NULL;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DCDeclaration::as_switch
|
||||
// Access: Published, Virtual
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
const DCSwitch *DCDeclaration::
|
||||
as_switch() const {
|
||||
return (DCSwitch *)NULL;
|
||||
}
|
||||
|
@ -40,7 +40,9 @@ public:
|
||||
|
||||
PUBLISHED:
|
||||
virtual DCClass *as_class();
|
||||
virtual const DCClass *as_class() const;
|
||||
virtual DCSwitch *as_switch();
|
||||
virtual const DCSwitch *as_switch() const;
|
||||
|
||||
public:
|
||||
virtual void write(ostream &out, bool brief, int indent_level) const=0;
|
||||
|
@ -73,6 +73,16 @@ as_field() {
|
||||
return this;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DCField::as_field
|
||||
// Access: Published, Virtual
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
const DCField *DCField::
|
||||
as_field() const {
|
||||
return this;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DCField::as_atomic_field
|
||||
// Access: Published, Virtual
|
||||
@ -85,6 +95,18 @@ as_atomic_field() {
|
||||
return (DCAtomicField *)NULL;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DCField::as_atomic_field
|
||||
// Access: Published, Virtual
|
||||
// Description: Returns the same field pointer converted to an atomic
|
||||
// field pointer, if this is in fact an atomic field;
|
||||
// otherwise, returns NULL.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
const DCAtomicField *DCField::
|
||||
as_atomic_field() const {
|
||||
return (DCAtomicField *)NULL;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DCField::as_molecular_field
|
||||
// Access: Published, Virtual
|
||||
@ -97,6 +119,18 @@ as_molecular_field() {
|
||||
return (DCMolecularField *)NULL;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DCField::as_molecular_field
|
||||
// Access: Published, Virtual
|
||||
// Description: Returns the same field pointer converted to a
|
||||
// molecular field pointer, if this is in fact a
|
||||
// molecular field; otherwise, returns NULL.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
const DCMolecularField *DCField::
|
||||
as_molecular_field() const {
|
||||
return (DCMolecularField *)NULL;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DCField::as_parameter
|
||||
// Access: Published, Virtual
|
||||
@ -108,13 +142,13 @@ as_parameter() {
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DCField::as_switch
|
||||
// Function: DCField::as_parameter
|
||||
// Access: Published, Virtual
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
DCSwitch *DCField::
|
||||
as_switch() {
|
||||
return (DCSwitch *)NULL;
|
||||
const DCParameter *DCField::
|
||||
as_parameter() const {
|
||||
return (DCParameter *)NULL;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
@ -44,10 +44,13 @@ PUBLISHED:
|
||||
int get_number() const;
|
||||
|
||||
virtual DCField *as_field();
|
||||
virtual const DCField *as_field() const;
|
||||
virtual DCAtomicField *as_atomic_field();
|
||||
virtual const DCAtomicField *as_atomic_field() const;
|
||||
virtual DCMolecularField *as_molecular_field();
|
||||
virtual const DCMolecularField *as_molecular_field() const;
|
||||
virtual DCParameter *as_parameter();
|
||||
virtual DCSwitch *as_switch();
|
||||
virtual const DCParameter *as_parameter() const;
|
||||
|
||||
string format_data(const string &packed_data);
|
||||
string parse_string(const string &formatted_string);
|
||||
|
@ -44,6 +44,18 @@ as_molecular_field() {
|
||||
return this;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DCMolecularField::as_molecular_field
|
||||
// Access: Published, Virtual
|
||||
// Description: Returns the same field pointer converted to a
|
||||
// molecular field pointer, if this is in fact a
|
||||
// molecular field; otherwise, returns NULL.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
const DCMolecularField *DCMolecularField::
|
||||
as_molecular_field() const {
|
||||
return this;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DCMolecularField::get_num_atomics
|
||||
// Access: Published
|
||||
|
@ -38,6 +38,7 @@ public:
|
||||
|
||||
PUBLISHED:
|
||||
virtual DCMolecularField *as_molecular_field();
|
||||
virtual const DCMolecularField *as_molecular_field() const;
|
||||
|
||||
int get_num_atomics() const;
|
||||
DCAtomicField *get_atomic(int n) const;
|
||||
|
@ -352,7 +352,7 @@ seek(const string &field_name) {
|
||||
|
||||
const DCPackerCatalog::Entry &entry = _live_catalog->get_entry(entry_index);
|
||||
|
||||
if (((DCPackerInterface *)entry._parent)->as_switch_parameter() != (DCSwitchParameter *)NULL) {
|
||||
if (entry._parent->as_switch_parameter() != (DCSwitchParameter *)NULL) {
|
||||
// If the parent is a DCSwitch, that can only mean that the
|
||||
// seeked field is a switch parameter. We can't support seeking
|
||||
// to a switch parameter and modifying it directly--what would
|
||||
@ -683,7 +683,7 @@ pack_object(PyObject *object) {
|
||||
bool is_instance = false;
|
||||
|
||||
const DCClass *dclass = NULL;
|
||||
const DCClassParameter *class_param = ((DCPackerInterface *)get_current_field())->as_class_parameter();
|
||||
const DCClassParameter *class_param = get_current_field()->as_class_parameter();
|
||||
if (class_param != (DCClassParameter *)NULL) {
|
||||
dclass = class_param->get_class();
|
||||
|
||||
@ -817,7 +817,7 @@ unpack_object() {
|
||||
|
||||
case PT_class:
|
||||
{
|
||||
const DCClassParameter *class_param = ((DCPackerInterface *)get_current_field())->as_class_parameter();
|
||||
const DCClassParameter *class_param = get_current_field()->as_class_parameter();
|
||||
if (class_param != (DCClassParameter *)NULL) {
|
||||
const DCClass *dclass = class_param->get_class();
|
||||
if (dclass->has_class_def()) {
|
||||
@ -1127,7 +1127,7 @@ pack_class_object(const DCClass *dclass, PyObject *object) {
|
||||
Py_DECREF(str);
|
||||
push();
|
||||
while (more_nested_fields()) {
|
||||
const DCField *field = ((DCPackerInterface *)get_current_field())->as_field();
|
||||
const DCField *field = get_current_field()->as_field();
|
||||
nassertv(field != (DCField *)NULL);
|
||||
|
||||
if (!dclass->pack_required_field(*this, object, field)) {
|
||||
@ -1165,7 +1165,7 @@ unpack_class_object(const DCClass *dclass) {
|
||||
push();
|
||||
if (object == (PyObject *)NULL && more_nested_fields()) {
|
||||
// The first nested field will be the constructor.
|
||||
const DCField *field = ((DCPackerInterface *)get_current_field())->as_field();
|
||||
const DCField *field = get_current_field()->as_field();
|
||||
nassertr(field != (DCField *)NULL, object);
|
||||
nassertr(field == dclass->get_constructor(), object);
|
||||
|
||||
@ -1177,7 +1177,7 @@ unpack_class_object(const DCClass *dclass) {
|
||||
}
|
||||
}
|
||||
while (more_nested_fields()) {
|
||||
const DCField *field = ((DCPackerInterface *)get_current_field())->as_field();
|
||||
const DCField *field = get_current_field()->as_field();
|
||||
nassertr(field != (DCField *)NULL, object);
|
||||
|
||||
set_class_element(class_def, object, field);
|
||||
@ -1211,7 +1211,7 @@ set_class_element(PyObject *class_def, PyObject *&object,
|
||||
// the class.
|
||||
push();
|
||||
while (more_nested_fields()) {
|
||||
const DCField *field = ((DCPackerInterface *)get_current_field())->as_field();
|
||||
const DCField *field = get_current_field()->as_field();
|
||||
nassertv(field != (DCField *)NULL);
|
||||
nassertv(object != (PyObject *)NULL);
|
||||
set_class_element(class_def, object, field);
|
||||
|
@ -215,7 +215,7 @@ r_fill_catalog(const string &name_prefix, const DCPackerInterface *field,
|
||||
next_name_prefix += ".";
|
||||
}
|
||||
|
||||
const DCSwitchParameter *switch_parameter = ((DCPackerInterface *)field)->as_switch_parameter();
|
||||
const DCSwitchParameter *switch_parameter = field->as_switch_parameter();
|
||||
if (switch_parameter != (DCSwitchParameter *)NULL) {
|
||||
// If we come upon a DCSwitch while building the catalog, save the
|
||||
// name_prefix at this point so we'll have it again when we later
|
||||
|
@ -82,7 +82,17 @@ as_field() {
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DCPackerInterface::as_switch
|
||||
// Function: DCPackerInterface::as_field
|
||||
// Access: Published, Virtual
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
const DCField *DCPackerInterface::
|
||||
as_field() const {
|
||||
return (DCField *)NULL;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DCPackerInterface::as_switch_parameter
|
||||
// Access: Published, Virtual
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
@ -91,6 +101,16 @@ as_switch_parameter() {
|
||||
return (DCSwitchParameter *)NULL;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DCPackerInterface::as_switch_parameter
|
||||
// Access: Published, Virtual
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
const DCSwitchParameter *DCPackerInterface::
|
||||
as_switch_parameter() const {
|
||||
return (DCSwitchParameter *)NULL;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DCPackerInterface::as_class_parameter
|
||||
// Access: Published, Virtual
|
||||
@ -101,6 +121,16 @@ as_class_parameter() {
|
||||
return (DCClassParameter *)NULL;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DCPackerInterface::as_class_parameter
|
||||
// Access: Published, Virtual
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
const DCClassParameter *DCPackerInterface::
|
||||
as_class_parameter() const {
|
||||
return (DCClassParameter *)NULL;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DCPackerInterface::calc_num_nested_fields
|
||||
// Access: Public, Virtual
|
||||
|
@ -77,8 +77,11 @@ PUBLISHED:
|
||||
INLINE const string &get_name() const;
|
||||
|
||||
virtual DCField *as_field();
|
||||
virtual const DCField *as_field() const;
|
||||
virtual DCSwitchParameter *as_switch_parameter();
|
||||
virtual const DCSwitchParameter *as_switch_parameter() const;
|
||||
virtual DCClassParameter *as_class_parameter();
|
||||
virtual const DCClassParameter *as_class_parameter() const;
|
||||
|
||||
public:
|
||||
INLINE void set_name(const string &name);
|
||||
|
@ -66,6 +66,16 @@ as_parameter() {
|
||||
return this;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DCParameter::as_parameter
|
||||
// Access: Published, Virtual
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
const DCParameter *DCParameter::
|
||||
as_parameter() const {
|
||||
return this;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DCParameter::as_simple_parameter
|
||||
// Access: Published, Virtual
|
||||
@ -76,6 +86,16 @@ as_simple_parameter() {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DCParameter::as_simple_parameter
|
||||
// Access: Published, Virtual
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
const DCSimpleParameter *DCParameter::
|
||||
as_simple_parameter() const {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DCParameter::as_class_parameter
|
||||
// Access: Published, Virtual
|
||||
@ -86,6 +106,16 @@ as_class_parameter() {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DCParameter::as_class_parameter
|
||||
// Access: Published, Virtual
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
const DCClassParameter *DCParameter::
|
||||
as_class_parameter() const {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DCParameter::as_switch_parameter
|
||||
// Access: Published, Virtual
|
||||
@ -96,6 +126,16 @@ as_switch_parameter() {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DCParameter::as_switch_parameter
|
||||
// Access: Published, Virtual
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
const DCSwitchParameter *DCParameter::
|
||||
as_switch_parameter() const {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DCParameter::as_array_parameter
|
||||
// Access: Published, Virtual
|
||||
@ -106,6 +146,16 @@ as_array_parameter() {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DCParameter::as_array_parameter
|
||||
// Access: Published, Virtual
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
const DCArrayParameter *DCParameter::
|
||||
as_array_parameter() const {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DCParameter::get_typedef
|
||||
// Access: Published
|
||||
|
@ -48,10 +48,15 @@ public:
|
||||
|
||||
PUBLISHED:
|
||||
virtual DCParameter *as_parameter();
|
||||
virtual const DCParameter *as_parameter() const;
|
||||
virtual DCSimpleParameter *as_simple_parameter();
|
||||
virtual const DCSimpleParameter *as_simple_parameter() const;
|
||||
virtual DCClassParameter *as_class_parameter();
|
||||
virtual const DCClassParameter *as_class_parameter() const;
|
||||
virtual DCSwitchParameter *as_switch_parameter();
|
||||
virtual const DCSwitchParameter *as_switch_parameter() const;
|
||||
virtual DCArrayParameter *as_array_parameter();
|
||||
virtual const DCArrayParameter *as_array_parameter() const;
|
||||
|
||||
virtual DCParameter *make_copy() const=0;
|
||||
virtual bool is_valid() const=0;
|
||||
|
@ -225,6 +225,16 @@ as_simple_parameter() {
|
||||
return this;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DCSimpleParameter::as_simple_parameter
|
||||
// Access: Published, Virtual
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
const DCSimpleParameter *DCSimpleParameter::
|
||||
as_simple_parameter() const {
|
||||
return this;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DCSimpleParameter::make_copy
|
||||
// Access: Published, Virtual
|
||||
|
@ -40,6 +40,7 @@ public:
|
||||
|
||||
PUBLISHED:
|
||||
virtual DCSimpleParameter *as_simple_parameter();
|
||||
virtual const DCSimpleParameter *as_simple_parameter() const;
|
||||
virtual DCParameter *make_copy() const;
|
||||
virtual bool is_valid() const;
|
||||
|
||||
|
@ -63,6 +63,16 @@ as_switch() {
|
||||
return this;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DCSwitch::as_switch
|
||||
// Access: Published, Virtual
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
const DCSwitch *DCSwitch::
|
||||
as_switch() const {
|
||||
return this;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DCSwitch::get_name
|
||||
// Access: Published
|
||||
|
@ -41,6 +41,7 @@ public:
|
||||
|
||||
PUBLISHED:
|
||||
virtual DCSwitch *as_switch();
|
||||
virtual const DCSwitch *as_switch() const;
|
||||
|
||||
const string &get_name() const;
|
||||
DCParameter *get_key_parameter() const;
|
||||
|
@ -92,6 +92,16 @@ as_switch_parameter() {
|
||||
return this;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DCSwitchParameter::as_switch_parameter
|
||||
// Access: Published, Virtual
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
const DCSwitchParameter *DCSwitchParameter::
|
||||
as_switch_parameter() const {
|
||||
return this;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DCSwitchParameter::make_copy
|
||||
// Access: Published, Virtual
|
||||
|
@ -37,6 +37,7 @@ public:
|
||||
|
||||
PUBLISHED:
|
||||
virtual DCSwitchParameter *as_switch_parameter();
|
||||
virtual const DCSwitchParameter *as_switch_parameter() const;
|
||||
virtual DCParameter *make_copy() const;
|
||||
virtual bool is_valid() const;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user