14 #ifndef DCSWITCHPARAMETER_H 15 #define DCSWITCHPARAMETER_H 35 virtual bool is_valid()
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;
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual void generate_hash(HashGenerator &hashgen) const
Accumulates the properties of this type into the hash.
This is a block of data that receives the results of DCPacker.
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 represents a switch statement, which can appear inside a class body and represents two or more a...
This represents a switch object used as a parameter itself, which packs the appropriate fields of the...
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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Represents the type specification for a single parameter within a field specification.
This class generates an arbitrary hash number from a sequence of ints.
virtual bool do_check_match_switch_parameter(const DCSwitchParameter *other) const
Returns true if this field matches the indicated switch parameter, false otherwise.
This defines the internal interface for packing values into a DCField.