Camel.NamedFlags

Fields

None

Methods

class

new ()

class

new_sized (reserve_size)

clear ()

contains (name)

copy ()

equal (named_flags_b)

free ()

get (index)

get_length ()

insert (name)

remove (name)

Details

class Camel.NamedFlags

New in version 3.24.

classmethod new()
Returns:

A newly allocated Camel.NamedFlags. Free it with Camel.NamedFlags.free() when done with it.

Return type:

Camel.NamedFlags

Creates a new Camel.NamedFlags.

New in version 3.24.

classmethod new_sized(reserve_size)
Parameters:

reserve_size (int) – an array size to reserve

Returns:

A newly allocated Camel.NameValueArray. Free it with Camel.NamedFlags.free() when done with it.

See: Camel.NameValueArray.new, Camel.NameValueArray.copy

Return type:

Camel.NamedFlags

Created a new Camel.NamedFlags, which has reserved reserve_size elements. This value doesn’t influence the Camel.NamedFlags.get_length(), which returns zero on the array returned from this function.

New in version 3.24.

clear()

Removes all the elements of the array.

New in version 3.24.

contains(name)
Parameters:

name (str) – name of the flag

Returns:

Whether the self contains a flag named name, comparing case sensitively.

Return type:

bool

New in version 3.24.

copy()
Returns:

A newly allocated Camel.NamedFlags. Free it with Camel.NamedFlags.free() when done with it.

Return type:

Camel.NamedFlags

Creates a copy of the self and returns it.

New in version 3.24.

equal(named_flags_b)
Parameters:

named_flags_b (Camel.NamedFlags or None) – the second Camel.NamedFlags

Returns:

Whether the two Camel.NamedFlags have the same content.

Return type:

bool

Compares content of the two Camel.NamedFlags and returns whether they equal. Note this is an expensive operation for large sets.

New in version 3.24.

free()

Frees memory associated iwth the self. Does nothing, if self is None.

New in version 3.24.

get(index)
Parameters:

index (int) – an index of an element

Returns:

Name of the flag in at the given index, or None on error.

Return type:

str or None

New in version 3.24.

get_length()
Returns:

Length of the array, aka how many named flags are stored there.

Return type:

int

New in version 3.24.

insert(name)
Parameters:

name (str) – name of the flag

Returns:

True the flag named name was inserted; False otherwise.

Return type:

bool

Inserts a flag named name into the self, if it is not included already (comparing case sensitively), or does nothing otherwise.

New in version 3.24.

remove(name)
Parameters:

name (str) – name of the flag

Returns:

True when the self contained a flag named name, comparing case sensitively, and it was removed; False otherwise.

Return type:

bool

Removes a flag named name from the self.

New in version 3.24.