# DCParameter

from pandac.PandaModules import DCParameter

Class : DCParameter
Description : Represents the type specification for a single parameter within a field specification. This may be a simple type, or it may be a class or an array reference.
This may also be a typedef reference to another type, which has the same properties as the referenced type, but a different name.

## Inheritance:

DCParameter: DCField
DCField: DCPackerInterface DCKeywordList
DCPackerInterface:
DCKeywordList:

## Methods of DCParameter:

asArrayParameter
asSimpleParameter
getTypedef
isValid
makeCopy

## Methods of DCField:

aiFormatUpdate
asAtomicField
asField
asMolecularField
asParameter
clientFormatUpdate
formatData
getClass
getDefaultValue
getNumber
hasDefaultValue
isAirecv
isBroadcast
isClrecv
isClsend
isDb
isOwnrecv
isOwnsend
isRam
isRequired
output
packArgs
parseString
receiveUpdate
unpackArgs
validateRanges
write

## Methods of DCPackerInterface:

asClassParameter
asField
asSwitchParameter
checkMatch
findSeekIndex
getName

## Methods of DCKeywordList:

compareKeywords
getKeyword
getKeywordByName
getNumKeywords
hasKeyword

asArrayParameter virtual DCArrayParameter *DCParameter::as_array_parameter(void); Description:

asSimpleParameter virtual DCSimpleParameter *DCParameter::as_simple_parameter(void); Description:

getTypedef DCTypedef const *DCParameter::get_typedef(void) const; Description: If this type has been referenced from a typedef, returns the DCTypedef instance, or NULL if the type was declared on-the-fly.

isValid virtual bool DCParameter::is_valid(void) const = 0; Undocumented function.

makeCopy virtual DCParameter *DCParameter::make_copy(void) const = 0; Undocumented function.

aiFormatUpdate Datagram DCField::ai_format_update(int do_id, unsigned __int64 to_id, unsigned __int64 from_id, PyObject *args) const; Description: Generates a datagram containing the message necessary to send an update for the indicated distributed object from the AI.

asAtomicField virtual DCAtomicField *DCField::as_atomic_field(void); Description: Returns the same field pointer converted to an atomic field pointer, if this is in fact an atomic field; otherwise, returns NULL.

asField virtual DCField *DCField::as_field(void); Description:

asMolecularField virtual DCMolecularField *DCField::as_molecular_field(void); Description: Returns the same field pointer converted to a molecular field pointer, if this is in fact a molecular field; otherwise, returns NULL.

asParameter virtual DCParameter *DCField::as_parameter(void); Description:

clientFormatUpdate Datagram DCField::client_format_update(int do_id, PyObject *args) const; Description: Generates a datagram containing the message necessary to send an update for the indicated distributed object from the client.

formatData string DCField::format_data(string const &packed_data); Description: Given a blob that represents the packed data for this field, returns a string formatting it for human consumption. Returns empty string if there is an error.

getClass DCClass *DCField::get_class(void) const; Description: Returns the DCClass pointer for the class that contains this field.

getDefaultValue string const &DCField::get_default_value(void) const; Description: Returns the default value for this field. If a default value has been explicitly set (e.g. has_default_value() returns true), returns that value; otherwise, returns an implicit default for the field.

getNumber int DCField::get_number(void) const; Filename: dcField.I Created by: drose (10Jan06) PANDA 3D SOFTWARE Copyright (c) 2001 - 2004, Disney Enterprises, Inc. All rights reserved All use of this software is subject to the terms of the Panda 3d Software license. You should have received a copy of this license along with this source code; you will also find a current copy of the license at http://etc.cmu.edu/panda3d/docs/license/ . To contact the maintainers of this program write to panda3d-general@lists.sourceforge.net . Description: Returns a unique index number associated with this field. This is defined implicitly when the .dc file(s) are read.

hasDefaultValue bool DCField::has_default_value(void) const; Description: Returns true if a default value has been explicitly established for this field, false otherwise.

isAirecv bool DCField::is_airecv(void) const; Description: Returns true if the "airecv" flag is set for this field, false otherwise.

isBroadcast bool DCField::is_broadcast(void) const; Description: Returns true if the "broadcast" flag is set for this field, false otherwise.

isClrecv bool DCField::is_clrecv(void) const; Description: Returns true if the "clrecv" flag is set for this field, false otherwise.

isClsend bool DCField::is_clsend(void) const; Description: Returns true if the "clsend" flag is set for this field, false otherwise.

isDb bool DCField::is_db(void) const; Description: Returns true if the "db" flag is set for this field, false otherwise.

isOwnrecv bool DCField::is_ownrecv(void) const; Description: Returns true if the "ownrecv" flag is set for this field, false otherwise.

isOwnsend bool DCField::is_ownsend(void) const; Description: Returns true if the "ownsend" flag is set for this field, false otherwise.

isRam bool DCField::is_ram(void) const; Description: Returns true if the "ram" flag is set for this field, false otherwise.

isRequired bool DCField::is_required(void) const; Description: Returns true if the "required" flag is set for this field, false otherwise.

output void DCField::output(ostream &out) const; Description : Write a string representation of this instance to <out>.

packArgs bool DCField::pack_args(DCPacker &packer, PyObject *sequence) const; Description: Packs the Python arguments from the indicated tuple into the packer. Returns true on success, false on failure. It is assumed that the packer is currently positioned on this field.

parseString string DCField::parse_string(string const &formatted_string); Description: Given a human-formatted string (for instance, as returned by format_data(), above) that represents the value of this field, parse the string and return the corresponding packed data. Returns empty string if there is an error.

receiveUpdate void DCField::receive_update(DCPacker &packer, PyObject *distobj) const; Description: Extracts the update message out of the datagram and applies it to the indicated object by calling the appropriate method.

unpackArgs PyObject *DCField::unpack_args(DCPacker &packer) const; Description: Unpacks the values from the packer, beginning at the current point in the unpack_buffer, into a Python tuple and returns the tuple. It is assumed that the packer is currently positioned on this field.

validateRanges bool DCField::validate_ranges(string const &packed_data) const; Description: Verifies that all of the packed values in the field data are within the specified ranges and that there are no extra bytes on the end of the record. Returns true if all fields are valid, false otherwise.

write void DCField::write(ostream &out, int indent_level) const; Description : Write a string representation of this instance to <out>.

asClassParameter virtual DCClassParameter *DCPackerInterface::as_class_parameter(void); Description:

asField virtual DCField *DCPackerInterface::as_field(void); Description:

asSwitchParameter virtual DCSwitchParameter *DCPackerInterface::as_switch_parameter(void); Description:

checkMatch bool DCPackerInterface::check_match(DCPackerInterface const *other) const; Description: Returns true if the other interface is bitwise the same as this one--that is, a uint32 only matches a uint32, etc. Names of components, and range limits, are not compared. Description: Returns true if this interface is bitwise the same as the interface described with the indicated formatted string, e.g. "(uint8, uint8, int16)", or false otherwise. If DCFile is not NULL, it specifies the DCFile that was previously loaded, from which some predefined structs and typedefs may be referenced in the description string.

findSeekIndex int DCPackerInterface::find_seek_index(string const &name) const; Description: Returns the index number to be passed to a future call to DCPacker::seek() to seek directly to the named field without having to look up the field name in a table later, or -1 if the named field cannot be found. If the named field is nested within a switch or some similar dynamic structure that reveals different fields based on the contents of the data, this mechanism cannot be used to pre-fetch the field index number--you must seek for the field by name.

getName string const &DCPackerInterface::get_name(void) const; Filename: dcPackerInterface.I Created by: drose (18Jun04) PANDA 3D SOFTWARE Copyright (c) 2001 - 2004, Disney Enterprises, Inc. All rights reserved All use of this software is subject to the terms of the Panda 3d Software license. You should have received a copy of this license along with this source code; you will also find a current copy of the license at http://etc.cmu.edu/panda3d/docs/license/ . To contact the maintainers of this program write to panda3d-general@lists.sourceforge.net . Description: Returns the name of this field, or empty string if the field is unnamed.

compareKeywords bool DCKeywordList::compare_keywords(DCKeywordList const &other) const; Description: Returns true if this list has the same keywords as the other list, false if some keywords differ. Order is not considered important.

getKeyword DCKeyword const *DCKeywordList::get_keyword(int n) const; Description: Returns the nth keyword in the list.

getKeywordByName DCKeyword const *DCKeywordList::get_keyword_by_name(string const &name) const; Description: Returns the keyword in the list with the indicated name, or NULL if there is no keyword in the list with that name.

getNumKeywords int DCKeywordList::get_num_keywords(void) const; Description: Returns the number of keywords in the list.

hasKeyword bool DCKeywordList::has_keyword(string const &name) const; Description: Returns true if this list includes the indicated keyword, false otherwise.