Loading...
Searching...
No Matches
Typedefs | Functions
Global functions

Typedefs

typedef BArchivable *(* instantiation_func) (BMessage *)
 Internal definition of a function that can instantiate objects that have been created with the BArchivable API.
 

Functions

status_t add_system_beep_event (const char *eventName, uint32 flags=0)
 Adds an event to the media server.
 
int32 atomic_add (int32 *value, int32 addValue)
 Atomically add the value of addValue to value.
 
int64 atomic_add64 (int64 *value, int64 addValue)
 Atomically add the value of addValue to value.
 
int32 atomic_and (int32 *value, int32 andValue)
 Atomically perform a bitwise AND operation of andValue to the variable andValue.
 
int64 atomic_and64 (int64 *value, int64 andValue)
 Atomically perform a bitwise AND operation of andValue to the variable andValue.
 
int32 atomic_get (int32 *value)
 Atomically return the value of value.
 
int64 atomic_get64 (int64 *value)
 Atomically return the value of value.
 
int32 atomic_get_and_set (int32 *value, int32 newValue)
 Atomically set the variable value to newvalue and return the old value.
 
int64 atomic_get_and_set64 (int64 *value, int64 newValue)
 Atomically set the variable value to newvalue and return the old value.
 
int32 atomic_or (int32 *value, int32 orValue)
 Atomically perform a bitwise OR operation of orValue to the variable andValue.
 
int64 atomic_or64 (int64 *value, int64 orValue)
 Atomically perform a bitwise OR operation of orValue to the variable andValue.
 
void atomic_set (int32 *value, int32 newValue)
 Atomically set the variable value to newvalue.
 
void atomic_set64 (int64 *value, int64 newValue)
 Atomically set the variable value to newvalue.
 
int32 atomic_test_and_set (int32 *value, int32 newValue, int32 testAgainst)
 Atomically set the variable value to newValue if the current value is testAgainst.
 
int64 atomic_test_and_set64 (int64 *value, int64 newValue, int64 testAgainst)
 Atomically set the variable value to newValue if the current value is testAgainst.
 
status_t beep ()
 Invoke the standard system beep to alert users.
 
int Compare (const BString &a, const BString &b)
 Lexicographically compare two strings.
 
int Compare (const BString *a, const BString *b)
 Lexicographically compare two strings.
 
instantiation_func find_instantiation_func (BMessage *archive)
 Internal function that searches for the instantiation func that works on the specified archive. Use instantiate_object() instead.
 
instantiation_func find_instantiation_func (const char *className)
 Internal function that searches for the instantiation func of a specific class. Use instantiate_object() instead.
 
instantiation_func find_instantiation_func (const char *className, const char *signature)
 Internal function that searches for the instantiation func with a specific signature. Use instantiate_object() instead.
 
int ICompare (const BString &a, const BString &b)
 Lexicographically compare two strings case-insensitively.
 
int ICompare (const BString *a, const BString *b)
 Lexicographically compare two strings case-insensitively.
 
BArchivableinstantiate_object (BMessage *from)
 Instantiate an archived object.
 
BArchivableinstantiate_object (BMessage *from, image_id *id)
 Instantiate an archived object with the object being defined in a different application or library.
 
bool operator!= (const char *a, const BString &b)
 Lexicographically compare if a is not equal to given BString b.
 
bool operator< (const char *a, const BString &b)
 Lexicographically compare if a is less than the given BString b.
 
bool operator<= (const char *a, const BString &b)
 Lexicographically compare if a is less than or equal to a given BString b.
 
bool operator== (const char *a, const BString &b)
 Lexicographically compare if a is equal to a given BString b.
 
bool operator> (const char *a, const BString &b)
 Lexicographically compare if a is greater than a given BString b.
 
bool operator>= (const char *a, const BString &b)
 Lexicographically compare if a is greater than or equal to a given BString b.
 
status_t system_beep (const char *eventName)
 Invokes the sound for event eventName.
 
bool validate_instantiation (BMessage *from, const char *className)
 Internal function that checks if the className is the same as the one stored in the from message.
 

Detailed Description

Typedef Documentation

◆ instantiation_func

typedef BArchivable *(* instantiation_func)(BMessage *)

Internal definition of a function that can instantiate objects that have been created with the BArchivable API.

Since
BeOS R3

Function Documentation

◆ add_system_beep_event()

status_t add_system_beep_event ( const char *  eventName,
uint32  flags = 0 
)

Adds an event to the media server.

Call this method to add a specific event to the media server. From Beep.h and in libbe.so.

Parameters
eventNameThe name of the event.
flagsCurrently unused. Pass 0.
Since
BeOS R5

◆ atomic_add()

int32 atomic_add ( int32 value,
int32  addValue 
)

Atomically add the value of addValue to value.

This is a thread-safe way of performing the *value += addValue operation. You should use these function when two or more threads might access the variable simultaneously. You don't have to use a semaphore or a mutex in this case.

Returns
The original value of value.
See also
atomic_add64() for a version that works on long long.
atomic_get_and_set()
atomic_set()
atomic_test_and_set()
atomic_and()
atomic_or()
atomic_get()
Since
BeOS R3

◆ atomic_add64()

int64 atomic_add64 ( int64 value,
int64  addValue 
)

Atomically add the value of addValue to value.

This is a thread-safe way of performing the *value += addValue operation. You should use these function when two or more threads might access the variable simultaneously. You don't have to use a semaphore or a mutex in this case.

Returns
The original value of value.
See also
atomic_add() for a version that works on an int32.
atomic_get_and_set64()
atomic_set64()
atomic_test_and_set64()
atomic_and64()
atomic_or64()
atomic_get64()
Since
Haiku R1

◆ atomic_and()

int32 atomic_and ( int32 value,
int32  andValue 
)

Atomically perform a bitwise AND operation of andValue to the variable andValue.

This is a thread-safe way of performing the *value &= andValue operation. You should use these function when two or more threads might access the variable simultaneously. You don't have to use a semaphore or a mutex in this case.

Returns
The original value of value.
See also
atomic_and64() for a version that works on long long.
atomic_get_and_set()
atomic_set()
atomic_test_and_set()
atomic_add()
atomic_or()
atomic_get()
Since
BeOS R3

◆ atomic_and64()

int64 atomic_and64 ( int64 value,
int64  andValue 
)

Atomically perform a bitwise AND operation of andValue to the variable andValue.

This is a thread-safe way of performing the *value &= andValue operation. You should use these function when two or more threads might access the variable simultaneously. You don't have to use a semaphore or a mutex in this case.

Returns
The original value of value.
See also
atomic_and() for a version that works on an int32.
atomic_get_and_set64()
atomic_set64()
atomic_test_and_set64()
atomic_add64()
atomic_or64()
atomic_get64()
Since
Haiku R1

◆ atomic_get()

int32 atomic_get ( int32 value)

Atomically return the value of value.

This is a thread-safe way of reading the contents of the value operation. You should use these function when two or more threads might access the variable simultaneously. You don't have to use a semaphore or a mutex in this case. The variable must be naturally aligned.

Returns
The original value of value.
See also
atomic_get64() for a version that works on long long.
atomic_get_and_set()
atomic_set()
atomic_test_and_set()
atomic_add()
atomic_and()
atomic_or()
Since
Haiku R1

◆ atomic_get64()

int64 atomic_get64 ( int64 value)

Atomically return the value of value.

This is a thread-safe way of reading the contents of the value operation. You should use these function when two or more threads might access the variable simultaneously. You don't have to use a semaphore or a mutex in this case. The variable must be naturally aligned.

Returns
The original value of value.
See also
atomic_get() for a version that works on an int32.
atomic_get_and_set64()
atomic_set64()
atomic_test_and_set64()
atomic_add64()
atomic_and64()
atomic_or64()
Since
Haiku R1

◆ atomic_get_and_set()

int32 atomic_get_and_set ( int32 value,
int32  newValue 
)

Atomically set the variable value to newvalue and return the old value.

This is a thread-safe way of performing the *value = newValue operation. You should use these function when two or more threads might access the variable simultaneously. You don't have to use a semaphore or a mutex in this case.

Returns
The original value of value.
See also
atomic_get_and_set64() for a version that works on long long.
atomic_set()
atomic_test_and_set()
atomic_add()
atomic_and()
atomic_or(),
atomic_get()
Since
Haiku R1

◆ atomic_get_and_set64()

int64 atomic_get_and_set64 ( int64 value,
int64  newValue 
)

Atomically set the variable value to newvalue and return the old value.

This is a thread-safe way of performing the *value = newValue operation. You should use these function when two or more threads might access the variable simultaneously. You don't have to use a semaphore or a mutex in this case.

Returns
The original value of value.
See also
atomic_get_and_set() for a version that works on an int32.
atomic_set64()
atomic_test_and_set64()
atomic_add64()
atomic_and64()
atomic_or64()
atomic_get64()
Since
Haiku R1

◆ atomic_or()

int32 atomic_or ( int32 value,
int32  orValue 
)

Atomically perform a bitwise OR operation of orValue to the variable andValue.

This is a thread-safe way of performing the *value |= orValue operation. You should use these function when two or more threads might access the variable simultaneously. You don't have to use a semaphore or a mutex in this case.

Returns
The original value of value.
See also
atomic_or64() for a version that works on long long.
atomic_get_and_set()
atomic_set()
atomic_test_and_set()
atomic_add()
atomic_and()
atomic_get()
Since
BeOS R3

◆ atomic_or64()

int64 atomic_or64 ( int64 value,
int64  orValue 
)

Atomically perform a bitwise OR operation of orValue to the variable andValue.

This is a thread-safe way of performing the *value |= orValue operation. You should use these function when two or more threads might access the variable simultaneously. You don't have to use a semaphore or a mutex in this case.

Returns
The original value of value.
See also
atomic_or() for a version that works on an int32.
atomic_get_and_set64()
atomic_set64()
atomic_test_and_set64()
atomic_add64()
atomic_and64()
atomic_get64()
Since
Haiku R1

◆ atomic_set()

void atomic_set ( int32 value,
int32  newValue 
)

Atomically set the variable value to newvalue.

This is a thread-safe way of performing the *value = newValue operation. You should use these function when two or more threads might access the variable simultaneously. You don't have to use a semaphore or a mutex in this case. The variable must be naturally aligned.

See also
atomic_set64() for a version that works on long long.
atomic_test_and_set()
atomic_add()
atomic_and()
atomic_or(),
atomic_get()
Since
Haiku R1

◆ atomic_set64()

void atomic_set64 ( int64 value,
int64  newValue 
)

Atomically set the variable value to newvalue.

This is a thread-safe way of performing the *value = newValue operation. You should use these function when two or more threads might access the variable simultaneously. You don't have to use a semaphore or a mutex in this case. The variable must be naturally aligned.

See also
atomic_set() for a version that works on an int32.
atomic_get_and_set64()
atomic_test_and_set64()
atomic_add64()
atomic_and64()
atomic_or64()
atomic_get64()
Since
Haiku R1

◆ atomic_test_and_set()

int32 atomic_test_and_set ( int32 value,
int32  newValue,
int32  testAgainst 
)

Atomically set the variable value to newValue if the current value is testAgainst.

This is a thread-safe way of conditionally performing the *value += newValue operation. You should use these function when two or more threads might access the variable simultaneously. You don't have to use a semaphore or a mutex in this case.

Returns
The original value of value.
See also
atomic_test_and_set64() for a version that works on long long.
atomic_get_and_set()
atomic_set()
atomic_add()
atomic_and()
atomic_or()
atomic_get()
Since
Haiku R1

◆ atomic_test_and_set64()

int64 atomic_test_and_set64 ( int64 value,
int64  newValue,
int64  testAgainst 
)

Atomically set the variable value to newValue if the current value is testAgainst.

This is a thread-safe way of conditionally performing the *value += newValue operation. You should use these function when two or more threads might access the variable simultaneously. You don't have to use a semaphore or a mutex in this case.

Returns
The original value of value.
See also
atomic_test_and_set() for a version that works on an int32.
atomic_get_and_set64()
atomic_set64()
atomic_add64()
atomic_and64()
atomic_or64()
atomic_get64()
Since
Haiku R1

◆ beep()

status_t beep ( )

Invoke the standard system beep to alert users.

From Beep.h and in libbe.so.

See also
system_beep() and add_system_beep_event()
Since
BeOS R3

◆ Compare() [1/2]

int Compare ( const BString a,
const BString b 
)

Lexicographically compare two strings.

This function is useful if you need a global compare function to feed to BList::SortItems().

Parameters
aThe first string to compare.
bThe second string to compare.

From String.h and in libbe.so.

Returns
An int representing the strings relationship to each other.
Return values
>0a sorts lexicographically after b.
=0a is equal to b.
<0a sorts lexicographically before b.
See also
BString::Compare(const BString&) const
Since
BeOS R5

◆ Compare() [2/2]

int Compare ( const BString a,
const BString b 
)

Lexicographically compare two strings.

This function is useful if you need a global compare function to feed to BList::SortItems().

From String.h and in libbe.so.

Parameters
aThe first string to compare.
bThe second string to compare.
Returns
An int representing the strings relationship to each other.
Return values
>0a sorts lexicographically after b.
=0a is equal to b.
<0a sorts lexicographically before b.
See also
BString::Compare(const BString&) const
Since
BeOS R5

◆ find_instantiation_func() [1/3]

instantiation_func find_instantiation_func ( BMessage archive)

Internal function that searches for the instantiation func that works on the specified archive. Use instantiate_object() instead.

Since
BeOS R3

◆ find_instantiation_func() [2/3]

instantiation_func find_instantiation_func ( const char *  className)

Internal function that searches for the instantiation func of a specific class. Use instantiate_object() instead.

Since
BeOS R3

◆ find_instantiation_func() [3/3]

instantiation_func find_instantiation_func ( const char *  className,
const char *  signature 
)

Internal function that searches for the instantiation func with a specific signature. Use instantiate_object() instead.

Since
Haiku R1

◆ ICompare() [1/2]

int ICompare ( const BString a,
const BString b 
)

Lexicographically compare two strings case-insensitively.

This function is useful if you need a global compare function to feed to BList::SortItems().

From String.h and in libbe.so.

Parameters
aThe first string to compare.
bThe second string to compare.
Returns
An int representing the strings relationship to each other.
Return values
>0a sorts lexicographically after b.
=0a is equal to b.
<0a sorts lexicographically before b.
See also
BString::Compare(const BString&) const
Since
BeOS R5

◆ ICompare() [2/2]

int ICompare ( const BString a,
const BString b 
)

Lexicographically compare two strings case-insensitively.

This function is useful if you need a global compare function to feed to BList::SortItems().

From String.h and in libbe.so.

Parameters
aThe first string to compare.
bThe second string to compare.
Returns
An int representing the strings relationship to each other.
Return values
>0a sorts lexicographically after b.
=0a is equal to b.
<0a sorts lexicographically before b.
See also
BString::Compare(const BString&) const
Since
BeOS R5

◆ instantiate_object() [1/2]

BArchivable * instantiate_object ( BMessage from)

Instantiate an archived object.

This global function will determine the base class, based on the from argument, and it will call the Instantiate() function of that object to restore it.

Parameters
fromThe archived object.
Returns
The object returns a pointer to the instantiated object, or NULL if the instantiation failed. The global errno variable will contain the reason why it failed.
See also
instantiate_object(BMessage *from, image_id *id)
Since
BeOS R3

◆ instantiate_object() [2/2]

BArchivable * instantiate_object ( BMessage from,
image_id *  id 
)

Instantiate an archived object with the object being defined in a different application or library.

This function is similar to instantiate_object(BMessage *from), except that it takes the id argument referring to an image where the object might be stored.

Note
Images are names for executable files. Image id's refer to these executable files that have been loaded by your application. Have a look at the kernel API for further information.
Since
BeOS R3

◆ operator!=()

bool operator!= ( const char *  a,
const BString b 
)
inline

Lexicographically compare if a is not equal to given BString b.

From String.h and in libbe.so.

Parameters
aThe first string to compare.
bThe second string to compare.
Returns
true if a is NOT equal to b, false otherwise.
See also
BString::operator!=(const char*) const
Since
BeOS R5

◆ operator<()

bool operator< ( const char *  a,
const BString b 
)
inline

Lexicographically compare if a is less than the given BString b.

From String.h and in libbe.so.

Parameters
aThe first string to compare.
bThe second string to compare.
Returns
true if a is less than b, false otherwise.
See also
BString::operator<(const char*) const
Since
BeOS R5

◆ operator<=()

bool operator<= ( const char *  a,
const BString b 
)
inline

Lexicographically compare if a is less than or equal to a given BString b.

From String.h and in libbe.so.

Parameters
aThe first string to compare.
bThe second string to compare.
Returns
true if a is less than or equal to b, false otherwise.
See also
BString::operator<=(const char*) const
Since
BeOS R5

◆ operator==()

bool operator== ( const char *  a,
const BString b 
)
inline

Lexicographically compare if a is equal to a given BString b.

From String.h and in libbe.so.

Parameters
aThe first string to compare.
bThe second string to compare.
See also
BString::operator==(const char*) const
Returns
true if a is equal to b, false otherwise.
Since
BeOS R5

◆ operator>()

bool operator> ( const char *  a,
const BString b 
)
inline

Lexicographically compare if a is greater than a given BString b.

From String.h and in libbe.so.

Parameters
aThe first string to compare.
bThe second string to compare.
See also
BString::operator>(const char*) const
Returns
true if a is greater than b, false otherwise.
Since
BeOS R5

◆ operator>=()

bool operator>= ( const char *  a,
const BString b 
)
inline

Lexicographically compare if a is greater than or equal to a given BString b.

From String.h and in libbe.so.

Parameters
aThe first string to compare.
bThe second string to compare.
Returns
true if a is greater than or equal to b, false otherwise.
See also
BString::operator>=(const char*) const
Since
BeOS R5

◆ system_beep()

status_t system_beep ( const char *  eventName)

Invokes the sound for event eventName.

You can add the events using add_system_beep_event(). From Beep.h and in libbe.so.

Since
BeOS R5

◆ validate_instantiation()

bool validate_instantiation ( BMessage from,
const char *  className 
)

Internal function that checks if the className is the same as the one stored in the from message.

Since
BeOS R3