HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pyModuleNotice.h
Go to the documentation of this file.
1 //
2 // Copyright 2016 Pixar
3 //
4 // Licensed under the terms set forth in the LICENSE.txt file available at
5 // https://openusd.org/license.
6 //
7 #ifndef PXR_BASE_TF_PY_MODULE_NOTICE_H
8 #define PXR_BASE_TF_PY_MODULE_NOTICE_H
9 
10 #include "pxr/pxr.h"
11 
12 #include "pxr/base/tf/api.h"
13 #include "pxr/base/tf/notice.h"
14 
15 #include <string>
16 
18 
19 /// \class TfPyModuleWasLoaded
20 ///
21 /// A \a TfNotice that is sent when a script module is loaded. Since many
22 /// modules may be loaded at once, listeners are encouraged to defer work
23 /// triggered by this notice to the end of an application iteration. This, of
24 /// course, is good practice in general.
25 ///
26 class TfPyModuleWasLoaded : public TfNotice {
27 public:
28  explicit TfPyModuleWasLoaded(std::string const &name) : _name(name) {}
29 
30  TF_API
31  virtual ~TfPyModuleWasLoaded();
32 
33  /// Return the name of the module that was loaded.
34  std::string const &GetName() { return _name; }
35 
36 private:
37  std::string _name;
38 };
39 
41 
42 #endif // PXR_BASE_TF_PY_MODULE_NOTICE_H
#define TF_API
Definition: api.h:23
std::string const & GetName()
Return the name of the module that was loaded.
GLuint const GLchar * name
Definition: glcorearb.h:786
virtual TF_API ~TfPyModuleWasLoaded()
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1425
TfPyModuleWasLoaded(std::string const &name)
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74