Skip to main content

Module notification

Module notification 

Source
Expand description

Notification types for Foundation.

Corresponds to Foundation/NSNotification.hpp.

§C++ Equivalent

namespace NS {
using NotificationName = class String*;

class Notification : public NS::Referencing<Notification> {
public:
    NS::String*     name() const;
    NS::Object*     object() const;
    NS::Dictionary* userInfo() const;
};

class NotificationCenter : public NS::Referencing<NotificationCenter> {
public:
    static class NotificationCenter* defaultCenter();
    Object* addObserver(NotificationName name, Object* pObj, void* pQueue, ObserverBlock block);
    void removeObserver(Object* pObserver);
};
}

Structs§

Notification
An Objective-C notification object.
NotificationCenter
An Objective-C notification center.

Type Aliases§

NotificationName
Notification name type (alias for String pointer).