15 #ifndef DCSWITCHPARAMETER_H 16 #define DCSWITCHPARAMETER_H 19 #include "dcParameter.h" 38 virtual bool is_valid()
const;
45 const DCPackerInterface *apply_switch(
const char *value_data,
size_t length)
const;
47 virtual void output_instance(ostream &out,
bool brief,
const string &prename,
48 const string &name,
const string &postname)
const;
49 virtual void write_instance(ostream &out,
bool brief,
int indent_level,
50 const string &prename,
const string &name,
51 const string &postname)
const;
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.
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 void write_instance(ostream &out, bool brief, int indent_level, const string &prename, const string &name, const string &postname) const
Formats the parameter in the C++-like dc syntax as a typename and identifier.
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.