| Class Overview |
BPropertyInfo(property_info* p = NULL,
bool free_on_delete = false);
Initializes the object with the specified zero-terminated array p
of
property_info.
Passing true
in
free_on_delete
instructs the object to
free the memory associated with the
property_info when the object is
destroyed. BPropertyInfo
does not copy the array, so it is important that
the array is not deleted or otherwise destroyed while the BPropertyInfo
is in use.
~BPropertyInfo();
If free_on_delete
is set to true
in the
constructor, the destructor frees all memory associated with the
property_info.
Otherwise, it does nothing.
int32 FindMatch(BMessage
* msg,
int32 index,
BMessage
* spec,
int32 form,
const char* prop,
void* data = NULL) const;
Passed a property name in prop
, a specifier in
form
, and a command in
msg
->what
, searches the
property_info
array for an item supporting the
specified scripting request. If index
is nonzero, then
FindMatch()
only searches those
property_info
structures with the wildcard command (first
element of command array equal to 0). Otherwise, it searches through all available
property_info
structures for a match. If a match is found, it
fills the memory at data
with the contents of the extra_data
field of the
match and returns the index of the match in the array. Otherwise, it
returns B_ERROR
.
void PrintToStream() const;
Prints information about the BPropertyInfo
to standard output.
const property_info* PropertyInfo() const;
Returns the property_info list associated with the object.
struct property_info { char*name
; uint32commands
[10]; uint32specifiers
[10]; char*usage
; uint32extra_data
; };
Field | Description |
---|---|
| Provides the name of the property this structure describes. |
| Is a zero-terminated array of commands understood by the
property, i.e. |
| Is a zero-terminated array of the specifiers understood by
the property, i.e. |
| Gives a human-readable string describing the property and its allowable commands and specifiers. |
| Is an area free for general use; the operating system does not touch its contents. |