OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
owl::TRegList Class Reference

A registration parameter table, composed of a list of TRegItems. More...

#include <owl/registry.h>

Inherited by owl::TRegListOldDocTemplate.

Public Member Functions

 TRegList (TRegItem *_list)
 Constructs a TRegList object from an array of TRegItems terminated by a NULL item name.
 
LPCTSTR Lookup (LPCSTR key, TLangId lang=TLocaleString::UserDefaultLangId)
 Performs the lookup of the TRegItems using a key (an item name such as progid) and returns the value associated with the key (for example, "My Sample Application").
 
LPCTSTR Lookup (const std::string &key, TLangId lang=TLocaleString::UserDefaultLangId)
 
TLocaleStringLookupRef (LPCSTR key)
 Looks up and returns a reference to a local string value associated with a particular item name (key).
 
TLocaleStringLookupRef (const std::string &key)
 
LPCTSTR operator[] (LPCSTR key)
 The array operator uses an item name (key) to locate an item in the array.
 
LPCTSTR operator[] (const std::string &key)
 

Public Attributes

TRegItemItems
 

Detailed Description

A registration parameter table, composed of a list of TRegItems.

Holds an array of items of type TRegItem. Provides functionality that lets you access each item in the array and return the name of the item. Instead of creating a TRegList directly, you can use ObjectWindows' registration macros to build a TRegList for you.

Definition at line 530 of file registry.h.

Constructor & Destructor Documentation

◆ TRegList()

owl::TRegList::TRegList ( TRegItem * _list)
inline

Constructs a TRegList object from an array of TRegItems terminated by a NULL item name.

Definition at line 1307 of file registry.h.

References PRECONDITION.

Member Function Documentation

◆ Lookup() [1/2]

LPCTSTR owl::TRegList::Lookup ( const std::string & key,
TLangId lang = TLocaleString::UserDefaultLangId )
inline

Definition at line 536 of file registry.h.

◆ Lookup() [2/2]

LPCTSTR owl::TRegList::Lookup ( LPCSTR key,
TLangId lang = TLocaleString::UserDefaultLangId )

Performs the lookup of the TRegItems using a key (an item name such as progid) and returns the value associated with the key (for example, "My Sample Application").

The value is returned in the language specified in lang (for example, French Canadian).

Returns an empty string if there is no associated value.

If the key does not exist, it returns a null pointer.

Definition at line 58 of file regheap.cpp.

References _T, and Items.

◆ LookupRef() [1/2]

TLocaleString & owl::TRegList::LookupRef ( const std::string & key)
inline

Definition at line 540 of file registry.h.

◆ LookupRef() [2/2]

TLocaleString & owl::TRegList::LookupRef ( LPCSTR key)

Looks up and returns a reference to a local string value associated with a particular item name (key).

You can then translate this string into the local language as necessary.

Definition at line 80 of file regheap.cpp.

References Items, and owl::TLocaleString::Null.

◆ operator[]() [1/2]

LPCTSTR owl::TRegList::operator[] ( const std::string & key)
inline

Definition at line 544 of file registry.h.

◆ operator[]() [2/2]

LPCTSTR owl::TRegList::operator[] ( LPCSTR key)
inline

The array operator uses an item name (key) to locate an item in the array.

Returns the value of the passed key as a const tchar*.

Definition at line 1317 of file registry.h.

References Lookup(), and PRECONDITION.

Member Data Documentation

◆ Items

TRegItem* owl::TRegList::Items

Definition at line 547 of file registry.h.


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