Audacity 3.2.0
Public Member Functions | Public Attributes | List of all members
anonymous_namespace{TempDirectory.cpp}::TempDirChangedPublisher Struct Referencefinal
Inheritance diagram for anonymous_namespace{TempDirectory.cpp}::TempDirChangedPublisher:
[legend]
Collaboration diagram for anonymous_namespace{TempDirectory.cpp}::TempDirChangedPublisher:
[legend]

Public Member Functions

void UpdateTempPath (const FilePath &path)
 
- Public Member Functions inherited from Observer::Publisher< FilePath >
 Publisher (ExceptionPolicy *pPolicy=nullptr, Alloc a={})
 Constructor supporting type-erased custom allocation/deletion. More...
 
 Publisher (Publisher &&)=default
 
Publisheroperator= (Publisher &&)=default
 
Subscription Subscribe (Callback callback)
 Connect a callback to the Publisher; later-connected are called earlier. More...
 
Subscription Subscribe (Object &obj, Return(Object::*callback)(Args...))
 Overload of Subscribe takes an object and pointer-to-member-function. More...
 

Public Attributes

FilePath prevPath
 

Additional Inherited Members

- Public Types inherited from Observer::Publisher< FilePath >
using message_type = FilePath
 
using CallbackReturn = std::conditional_t< true, void, bool >
 
using Callback = std::function< CallbackReturn(const FilePath &) >
 Type of functions that can be connected to the Publisher. More...
 
- Static Public Attributes inherited from Observer::Publisher< FilePath >
static constexpr bool notifies_all
 
- Protected Member Functions inherited from Observer::Publisher< FilePath >
CallbackReturn Publish (const FilePath &message)
 Send a message to connected callbacks. More...
 

Detailed Description

Definition at line 19 of file TempDirectory.cpp.

Member Function Documentation

◆ UpdateTempPath()

void anonymous_namespace{TempDirectory.cpp}::TempDirChangedPublisher::UpdateTempPath ( const FilePath path)
inline

Definition at line 21 of file TempDirectory.cpp.

22 {
23 if (prevPath != path)
24 {
25 Publish(path);
26 prevPath = path;
27 }
28 }
CallbackReturn Publish(const FilePath &message)
Send a message to connected callbacks.
Definition: Observer.h:207

Referenced by TempDirectory::SetDefaultTempDir().

Here is the caller graph for this function:

Member Data Documentation

◆ prevPath

FilePath anonymous_namespace{TempDirectory.cpp}::TempDirChangedPublisher::prevPath

Definition at line 30 of file TempDirectory.cpp.


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