13#if defined(BI_APP_DLL)
14# if !defined(__CYGWIN__) && !defined(WINELIB)
20#if defined(__BORLANDC__)
50# if defined(BI_COMP_BORLANDC)
61 virtual ~TAppDictImp() {}
63 virtual void Add(
unsigned pid, TApplication*
app) = 0;
64 virtual void Remove(
unsigned pid) = 0;
65 virtual TAppDictionary::TEntry* Lookup(
unsigned pid) = 0;
66 virtual TAppDictionary::TEntry* Lookup(TApplication*
app) = 0;
68 virtual int GetCount()
const = 0;
74class TAppDictInstImp :
public TAppDictImp {
76 TAppDictInstImp() {Entry.
App =
nullptr;}
78 void Add(
unsigned, TApplication*
app) {Entry.
App =
app;}
79 void Remove(
unsigned) {Entry.
App =
nullptr;}
80 TAppDictionary::TEntry* Lookup(
unsigned) {
return &Entry;}
81 TAppDictionary::TEntry* Lookup(TApplication*) {
return &Entry;}
84 int GetCount()
const {
return Entry.
App ? 1 : 0;}
87 TAppDictionary::TEntry Entry;
89# if defined(BI_COMP_BORLANDC)
173 Imp =
new TAppDictInstImp();
222 entry->App =
nullptr;
237 entry->App =
nullptr;
282 Imp->Iterate(_DeleteCondemnedIter);
283 return Imp->GetCount() == 0;
302 WARN(
app == 0,
_T(
"OWLGetAppDictionary().GetApplication(pid) returned NULL"));
owl::TApplication * GetTaskApplicationObject(unsigned pid)
Exported entry for Debugger use.
Definition of class TAppDictionary.
Definition of class TApplication.
#define WARN(condition, message)
TAppDictionary implementation for DLLs only.
void(* TEntryIterator)(TEntry &)
A dictionary iterator function pointer type that receives a reference to an entry.
~TAppDictionary()
Destroys the TAppDictionary object and calls DeleteCondemned to clean up the condemned applications.
void Condemn(TApplication *app)
Marks an application in this dictionary as condemned by zeroing its process ID so that the applicatio...
TApplication * GetApplication(uint pid=0)
Looks up and returns the application associated with a given process ID.
TAppDictionary()
Application dictionary constructor.
bool DeleteCondemned()
Deletes all condemned applications from the dictionary.
void Iterate(TEntryIterator iter)
Iterates through the entries in the application dictionary, calling the iter callback function for ea...
void Remove(TApplication *app)
Searches for the dictionary entry using the specified application (app).
void Add(TApplication *app, uint pid=0)
Adds an application object (app) and corresponding process ID to this dictionary.
Derived from TModule and TMsgThread and virtually derived from TEventHandler, TApplication acts as an...
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
Object Windows Library (OWLNext Core)
TApplication * GetApplicationObject(uint pid=0)
Global function that calls GetApplication() on owl's app-dictionary.
TAppDictionary & OWLGetAppDictionary()
Global exported TAppDictionary in Owl.
Definition of class TString, a flexible universal string envelope class.
An application dictionary entry that associates a process ID (Pid) with an application (App).