Visit Our UNIX and Linux User Community

Linux and UNIX Man Pages

Test Your Knowledge in Computers #810
Difficulty: Medium
The CSS3 RGB Decimal Code for Turquoise is 64,224,218.
True or False?
Linux & Unix Commands - Search Man Pages

umap(3u) [debian man page]

UMap(3U)						    InterViews Reference Manual 						  UMap(3U)

NAME
UMap - maintains a mapping between two sets of pointers SYNOPSIS
#include <Unidraw/umap.h> DESCRIPTION
UMap is an abstract class for objects that store an arbitrary number of pointer pairs and can search to find either member of a pair given the other. A UMapElem object stores each pointer pair in the UMap. UMapElem is an abstract class that defines virtuals for returning either member of the pair, referred to as the id and the tag. Subclasses of UMapElem redefine these virtuals to return either member of the pair they store. UMAPELEM PUBLIC OPERATIONS
UMapElem() The base class constructor does nothing by default. virtual void* id() virtual void* tag() Return the id or the tag that the UMapElem stores. Subclasses typically define two member variables that store pair's values and redefine these operations to return them. UMAP PUBLIC OPERATIONS
virtual ~UMap() The destructor deletes all UMapElem objects in the UMap. int Count() Return the number of mappings in the UMap, corresponding to the number of UMapElems that have been registered. void Clear() Delete all the UMapElem mappings in the UMap without destroying the UMap. UMAP PROTECTED OPERATIONS
UMap() The base class constructor does nothing by default. void Register(UMapElem*) void Unregister(UMapElem*) Register or remove a UMapElem from the UMap. int Index(UMapElem*) UMapElem* Elem(int index) A UMap stores its UMapElem in its _elems UArray protected member variable. The Index operations returns the index of the given UMapElem in the UArray, while Elem returns the UMapElem at a specified index. These operations simply perform the corresponding operations on the UArray. virtual UMapElem* FindId(void* id) virtual UMapElem* FindTag(void* tag) FindId searches the UMap for the UMapElem element containing the given id, while FindTag searches for the one with the given tag. These operations perform linear searches by default, comparing their arguments against the values that the UMapElems' id and tag operations return. The comparison is based on the pointer values; subclasses can redefine these operations to make more sophisti- cated comparisons based on the id or tags actual type. For example, if either the id is a string, then FindId might do a string comparison to detect a match. SEE ALSO
UArray(3U) Unidraw 4 October 1990 UMap(3U)

Check Out this Related Man Page

EditorInfo(3U)						    InterViews Reference Manual 					    EditorInfo(3U)

NAME
EditorInfo - stores information about an editor's contents SYNOPSIS
#include <Unidraw/editorinfo.h> DESCRIPTION
An EditorInfo object is a UMap that stores a list of strings and/or string tuples. Application-specific editors can use these objects to store information about what components, commands, and tools they incorporate in their interface. The programmer can write out this infor- mation with a catalog object and read it back in later. The application can then let the user change the editor's configuration by editing the catalog-generated file. For example, an EditorInfo object could have a list of names for tools in the editor's interface that have been saved with the catalog. When the application is restarted, the EditorInfo object can be read first, and then the catalog can recon- struct the tools given their names. PUBLIC OPERATIONS
EditorInfo() Construct an EditorInfo instance. void Register(const char* name, const char* info = ``'') void UnregisterName(const char*) void UnregisterInfo(const char*) boolean Registered(const char* name) Register enters a name or name-info tuple into the EditorInfo object. UnregisterName removes an entry whose name string matches the given one, while UnregisterInfo removes an entry whose info string matches the given one. The Registered operation returns whether or not an entry with a matching name exists. const char* GetName(const char* info) const char* GetInfo(const char* name) Name-info tuple lookup operations. The GetName operation returns the name corresponding to a given info string, while the GetInfo operation returns the info string for a given name. const char* GetName(int index) const char* GetInfo(int index) Name or info strings can be accessed by an index that reflects the order in which they were registered. These operations return the name or info string for a given index. SEE ALSO
Catalog(3U), Editor(3U), UMap(3U) Unidraw 30 July 1990 EditorInfo(3U)

Featured Tech Videos