14#ifndef DCSWITCHPARAMETER_H
15#define DCSWITCHPARAMETER_H
26class EXPCL_DIRECT_DCPARSER DCSwitchParameter :
public DCParameter {
28 DCSwitchParameter(
const DCSwitch *dswitch);
29 DCSwitchParameter(
const DCSwitchParameter ©);
32 virtual DCSwitchParameter *as_switch_parameter();
33 virtual const DCSwitchParameter *as_switch_parameter()
const;
34 virtual DCParameter *make_copy()
const;
42 const DCPackerInterface *
apply_switch(
const char *value_data,
size_t length)
const;
44 virtual void output_instance(std::ostream &out,
bool brief,
const std::string &prename,
45 const std::string &name,
const std::string &postname)
const;
46 virtual void write_instance(std::ostream &out,
bool brief,
int indent_level,
47 const std::string &prename,
const std::string &name,
48 const std::string &postname)
const;
53 virtual bool do_check_match(
const DCPackerInterface *other)
const;
virtual bool pack_default_value(DCPackData &pack_data, bool &pack_error) const
Packs the field's specified default value (or a sensible default if no value is specified) into the s...
This is a block of data that receives the results of DCPacker.
virtual bool do_check_match_switch_parameter(const DCSwitchParameter *other) const
Returns true if this field matches the indicated switch parameter, false otherwise.
virtual DCPackerInterface * get_nested_field(int n) const
Returns the DCPackerInterface object that represents the nth nested field.
virtual void write_instance(std::ostream &out, bool brief, int indent_level, const std::string &prename, const std::string &name, const std::string &postname) const
Formats the parameter in the C++-like dc syntax as a typename and identifier.
virtual void generate_hash(HashGenerator &hashgen) const
Accumulates the properties of this type into the hash.
virtual void output_instance(std::ostream &out, bool brief, const std::string &prename, const std::string &name, const std::string &postname) const
Formats the parameter in the C++-like dc syntax as a typename and identifier.
const DCPackerInterface * apply_switch(const char *value_data, size_t length) const
Returns the DCPackerInterface that presents the alternative fields for the case indicated by the give...
virtual bool is_valid() const
Returns false if the type is an invalid type (e.g.
const DCSwitch * get_switch() const
Returns the switch object this parameter represents.
This represents a switch statement, which can appear inside a class body and represents two or more a...
This class generates an arbitrary hash number from a sequence of ints.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.