Public Member Functions | Static Protected Member Functions | List of all members
BPropertyInfo Class Reference

Class used to manage scripting. More...

Inherits BFlattenable.

Public Member Functions

 BPropertyInfo (property_info *prop=NULL, value_info *value=NULL, bool freeOnDelete=false)
 Initializes the object with the specified NULL-terminated arrays propertyInfo and valueInfo. More...
 
virtual ~BPropertyInfo ()
 Destructor method. More...
 
virtual bool AllowsTypeCode (type_code code) const
 Returns true if code is B_PROPERTY_INFO_TYPE, false otherwise. More...
 
int32 CountProperties () const
 Returns The number of properties specified as an int32. More...
 
int32 CountValues () const
 Returns The number of values specified as an int32. More...
 
virtual int32 FindMatch (BMessage *msg, int32 index, BMessage *specifier, int32 form, const char *prop, void *data=NULL) const
 
virtual status_t Flatten (void *buffer, ssize_t size) const
 
virtual ssize_t FlattenedSize () const
 Returns the size of the flattened object in bytes. More...
 
virtual bool IsFixedSize () const
 Always returns false. More...
 
void PrintToStream () const
 Prints each property, command, type, and specifier to standard output. More...
 
const property_infoProperties () const
 Returns the properties as a property_info pointer. More...
 
virtual type_code TypeCode () const
 Always returns B_PROPERTY_INFO_TYPE. More...
 
virtual status_t Unflatten (type_code code, const void *buffer, ssize_t size)
 
const value_info * Values () const
 Returns the values as a value_info pointer. More...
 
- Public Member Functions inherited from BFlattenable
virtual ~BFlattenable ()
 Destructor. Does nothing. More...
 

Static Protected Member Functions

static bool FindCommand (uint32 what, int32 index, property_info *info)
 Find the command inside of propertyInfo matching what and index. More...
 
static bool FindSpecifier (uint32 form, property_info *info)
 Find the specifier inside of propertyInfo matching form. More...
 

Detailed Description

Class used to manage scripting.

Since
BeOS R3

Constructor & Destructor Documentation

◆ BPropertyInfo()

BPropertyInfo::BPropertyInfo ( property_info propertyInfo = NULL,
value_info *  valueInfo = NULL,
bool  freeOnDelete = false 
)

Initializes the object with the specified NULL-terminated arrays propertyInfo and valueInfo.

The arrays are not copied so do not modify or delete the arrays while they are in use by BPropertyInfo.

Parameters
propertyInfoThe NULL-terminated properties array.
valueInfoThe NULL-terminated values array.
freeOnDeleteif true, free the memory associated with propertyInfo and valueInfo when the object is destroyed.
Since
BeOS R3

◆ ~BPropertyInfo()

BPropertyInfo::~BPropertyInfo ( )
virtual

Destructor method.

If freeOnDelete is set to true in the constructor this method frees all memory associated with propertyInfo and valueInfo.

Since
BeOS R3

Member Function Documentation

◆ AllowsTypeCode()

bool BPropertyInfo::AllowsTypeCode ( type_code  code) const
virtual

Returns true if code is B_PROPERTY_INFO_TYPE, false otherwise.

See also
BFlattenable::AllowsTypeCode()
Since
BeOS R4

Reimplemented from BFlattenable.

◆ CountProperties()

int32 BPropertyInfo::CountProperties ( ) const

Returns The number of properties specified as an int32.

Since
Haiku R1

◆ CountValues()

int32 BPropertyInfo::CountValues ( ) const

Returns The number of values specified as an int32.

Since
Haiku R1

◆ FindCommand()

bool BPropertyInfo::FindCommand ( uint32  what,
int32  index,
property_info propertyInfo 
)
staticprotected

Find the command inside of propertyInfo matching what and index.

You may want to override this method in derived classes.

Returns
true if the command was found, false otherwise.
Since
Haiku R1

◆ FindMatch()

int32 BPropertyInfo::FindMatch ( BMessage message,
int32  index,
BMessage specifier,
int32  form,
const char *  property,
void *  data = NULL 
) const
virtual
Since
BeOS R3

◆ FindSpecifier()

bool BPropertyInfo::FindSpecifier ( uint32  form,
property_info propertyInfo 
)
staticprotected

Find the specifier inside of propertyInfo matching form.

You may want to override this method in derived classes.

Returns
true if the specifier was found, false otherwise.
Since
Haiku R1

◆ Flatten()

status_t BPropertyInfo::Flatten ( void *  buffer,
ssize_t  numBytes 
) const
virtual
See also
BFlattenable::Flatten()
Since
BeOS R4

Implements BFlattenable.

◆ FlattenedSize()

ssize_t BPropertyInfo::FlattenedSize ( ) const
virtual

Returns the size of the flattened object in bytes.

See also
BFlattenable::FlattenedSize()
Since
BeOS R4

Implements BFlattenable.

◆ IsFixedSize()

bool BPropertyInfo::IsFixedSize ( ) const
virtual

Always returns false.

See also
BFlattenable::IsFixedSize()
Since
BeOS R4

Implements BFlattenable.

◆ PrintToStream()

void BPropertyInfo::PrintToStream ( ) const

Prints each property, command, type, and specifier to standard output.

Since
BeOS R4

◆ Properties()

const property_info * BPropertyInfo::Properties ( ) const

Returns the properties as a property_info pointer.

Returns the pointer directly, does not make copy.

Called PropertyInfo() in the BeBook.

Since
BeOS R4

◆ TypeCode()

type_code BPropertyInfo::TypeCode ( ) const
virtual

Always returns B_PROPERTY_INFO_TYPE.

See also
BFlattenable::TypeCode()
Since
BeOS R4

Implements BFlattenable.

◆ Unflatten()

status_t BPropertyInfo::Unflatten ( type_code  code,
const void *  buffer,
ssize_t  numBytes 
)
virtual
See also
BFlattenable::Unflatten()
Since
BeOS R4

Implements BFlattenable.

◆ Values()

const value_info * BPropertyInfo::Values ( ) const

Returns the values as a value_info pointer.

Returns the pointer directly, does not make copy.

Since
Haiku R1