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