OCC Main Page | DataExchange | Toolkits | Packages | Class Hierarchy | Data Structures | File List | Data Fields | Globals

# DataExchange
TKXSBase
Interface

# Interface_BitMap Class Reference

A bit map simply allows to associate a boolean flag to each
item of a list, such as a list of entities, etc... numbered
between 1 and a positive count nbitems
The BitMap class allows to associate several binary flags,
each of one is identified by a number from 0 to a count
which can remain at zero or be positive : nbflags
Flags lists over than numflag=0 are added after creation
Each of one can be named, hence the user can identify it
either by its flag number or by a name which gives a flag n0
(flag n0 0 has no name)
.

`#include <Interface_BitMap.hxx>`

## Public Member Functions
void * | operator new (size_t, void *anAddress)
void * | operator new (size_t size)
void | operator delete (void *anAddress)
Standard_EXPORT | Interface_BitMap (const Standard_Integer nbitems, const Standard_Integer resflags=0)
| Creates a BitMap for <nbitems> items One flag is defined, n0 0 <resflags> prepares allocation for <resflags> more flags Flags values start at false .
Standard_EXPORT | Interface_BitMap (const Interface_BitMap &other, const Standard_Boolean copied=Standard_False)
| Creates a BitMap from another one if <copied> is True, copies data else, data are not copied, only the header object is .
Standard_EXPORT void | Internals (Standard_Integer &nbitems, Standard_Integer &nbwords, Standard_Integer &nbflags, Handle(TColStd_HArray1OfInteger)&flags, Handle(TColStd_HSequenceOfAsciiString)&names) const
| Returns internal values, used for copying Flags values start at false .
Standard_EXPORT void | Reservate (const Standard_Integer moreflags)
| Reservates for a count of more flags .
Standard_EXPORT void | SetLength (const Standard_Integer nbitems)
| Sets for a new count of items, which can be either less or greater than the former one For new items, their flags start at false .
Standard_EXPORT Standard_Integer | AddFlag (const Standard_CString name="")
| Adds a flag, a name can be attached to it Returns its flag number Makes required reservation .
Standard_EXPORT Standard_Integer | AddSomeFlags (const Standard_Integer more)
| Adds several flags (<more>) with no name Returns the number of last added flag .
Standard_EXPORT Standard_Boolean | RemoveFlag (const Standard_Integer num)
| Removes a flag given its number. Returns True if done, false if num is out of range .
Standard_EXPORT Standard_Boolean | SetFlagName (const Standard_Integer num, const Standard_CString name)
| Sets a name for a flag, given its number name can be empty (to erase the name of a flag) Returns True if done, false if : num is out of range, or name non-empty already set to another flag .
Standard_EXPORT Standard_Integer | NbFlags () const
| Returns the count of flags (flag 0 not included) .
Standard_EXPORT Standard_Integer | Length () const
| Returns the count of items (i.e. the length of the bitmap) .
Standard_EXPORT Standard_CString | FlagName (const Standard_Integer num) const
| Returns the name recorded for a flag, or an empty string .
Standard_EXPORT Standard_Integer | FlagNumber (const Standard_CString name) const
| Returns the number or a flag given its name, or zero .
Standard_EXPORT Standard_Boolean | Value (const Standard_Integer item, const Standard_Integer flag=0) const
| Returns the value (true/false) of a flag, from : - the number of the item - the flag number, by default 0 .
Standard_EXPORT void | SetValue (const Standard_Integer item, const Standard_Boolean val, const Standard_Integer flag=0) const
| Sets a new value for a flag .
Standard_EXPORT void | SetTrue (const Standard_Integer item, const Standard_Integer flag=0) const
| Sets a flag to True .
Standard_EXPORT void | SetFalse (const Standard_Integer item, const Standard_Integer flag=0) const
| Sets a flag to False .
Standard_EXPORT Standard_Boolean | CTrue (const Standard_Integer item, const Standard_Integer flag=0) const
| Returns the former value for a flag and sets it to True (before : value returned; after : True) .
Standard_EXPORT Standard_Boolean | CFalse (const Standard_Integer item, const Standard_Integer flag=0) const
| Returns the former value for a flag and sets it to False (before : value returned; after : False) .
Standard_EXPORT void | Init (const Standard_Boolean val, const Standard_Integer flag=0) const
| Initialises all the values of Flag Number <flag> to a given value <val> .
## Private Attributes
Standard_Integer | thenbitems
Standard_Integer | thenbwords
Standard_Integer | thenbflags
Handle_TColStd_HArray1OfInteger | theflags
Handle_TColStd_HSequenceOfAsciiString | thenames

## Constructor & Destructor Documentation

Standard_EXPORT Interface_BitMap::Interface_BitMap | ( | const Standard_Integer | nbitems,
|  | const Standard_Integer | resflags = `0`
| ) |

Standard_EXPORT Interface_BitMap::Interface_BitMap | ( | const Interface_BitMap & | other,
|  | const Standard_Boolean | copied = `Standard_False`
| ) |

## Member Function Documentation

Standard_EXPORT Standard_Integer Interface_BitMap::AddFlag | ( | const Standard_CString | name = `""` | ) |

Standard_EXPORT Standard_Integer Interface_BitMap::AddSomeFlags | ( | const Standard_Integer | more | ) |

Standard_EXPORT Standard_Boolean Interface_BitMap::CFalse | ( | const Standard_Integer | item,
|  | const Standard_Integer | flag = `0`
| ) | const

Standard_EXPORT Standard_Boolean Interface_BitMap::CTrue | ( | const Standard_Integer | item,
|  | const Standard_Integer | flag = `0`
| ) | const

Standard_EXPORT Standard_CString Interface_BitMap::FlagName | ( | const Standard_Integer | num | ) | const

Standard_EXPORT Standard_Integer Interface_BitMap::FlagNumber | ( | const Standard_CString | name | ) | const

Standard_EXPORT void Interface_BitMap::Init | ( | const Standard_Boolean | val,
|  | const Standard_Integer | flag = `0`
| ) | const

Standard_EXPORT void Interface_BitMap::Internals | ( | Standard_Integer & | nbitems,
|  | Standard_Integer & | nbwords,
|  | Standard_Integer & | nbflags,
|  | Handle(TColStd_HArray1OfInteger)& | flags,
|  | Handle(TColStd_HSequenceOfAsciiString)& | names
| ) | const

Standard_EXPORT Standard_Integer Interface_BitMap::Length | ( |  | ) | const

Standard_EXPORT Standard_Integer Interface_BitMap::NbFlags | ( |  | ) | const

void Interface_BitMap::operator delete | ( | void * | anAddress | ) | `[inline]`

void* Interface_BitMap::operator new | ( | size_t | size | ) | `[inline]`

void* Interface_BitMap::operator new | ( | size_t | ,
|  | void * | anAddress
| ) | `[inline]`

Standard_EXPORT Standard_Boolean Interface_BitMap::RemoveFlag | ( | const Standard_Integer | num | ) |

Standard_EXPORT void Interface_BitMap::Reservate | ( | const Standard_Integer | moreflags | ) |

Standard_EXPORT void Interface_BitMap::SetFalse | ( | const Standard_Integer | item,
|  | const Standard_Integer | flag = `0`
| ) | const

Standard_EXPORT Standard_Boolean Interface_BitMap::SetFlagName | ( | const Standard_Integer | num,
|  | const Standard_CString | name
| ) |

Standard_EXPORT void Interface_BitMap::SetLength | ( | const Standard_Integer | nbitems | ) |

Standard_EXPORT void Interface_BitMap::SetTrue | ( | const Standard_Integer | item,
|  | const Standard_Integer | flag = `0`
| ) | const

Standard_EXPORT void Interface_BitMap::SetValue | ( | const Standard_Integer | item,
|  | const Standard_Boolean | val,
|  | const Standard_Integer | flag = `0`
| ) | const

Standard_EXPORT Standard_Boolean Interface_BitMap::Value | ( | const Standard_Integer | item,
|  | const Standard_Integer | flag = `0`
| ) | const

## Field Documentation

Handle_TColStd_HArray1OfInteger Interface_BitMap::theflags`[private]`

Handle_TColStd_HSequenceOfAsciiString Interface_BitMap::thenames`[private]`

Standard_Integer Interface_BitMap::thenbflags`[private]`

Standard_Integer Interface_BitMap::thenbitems`[private]`

Standard_Integer Interface_BitMap::thenbwords`[private]`

The documentation for this class was generated from the following file:

- Interface_BitMap.hxx