HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UN_ParmTypeRegistry.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: UN_ParmTypeRegistry.h ( UN Library, C++)
7  *
8  * COMMENTS:
9  *
10  */
11 
12 #ifndef __UN_ParmTypeRegistry_h__
13 #define __UN_ParmTypeRegistry_h__
14 
15 #include "UN_API.h"
16 #include "UN_ParmType.h"
17 #include "UN_TypeRegistry.h"
18 
19 
20 // ============================================================================
21 /// A registry that maintains the set of parm types.
22 ///
23 class UN_API UN_ParmTypeRegistry : public UN_TypeRegistry< UN_ParmType >
24 {
25 public:
28 
29  /// @{ Constructor and destructor
31  /// @}
32 
33  /// Adds the given parm type to the reigstry.
34  bool addType( UN_ParmTypeHandle parm_type )
35  {
36  if( !parm_type || !parm_type->hasValidName() )
37  return false; // null type and bad type name disallowed
38  return Base::addType( std::move( parm_type ));
39  }
40 
41 private:
42 };
43 
44 
45 #endif
46 
UT_UniquePtr< UN_ParmType > UN_ParmTypeHandle
A handle to the parm type object, for expressing the ownership.
Definition: UN_ParmType.h:48
bool addType(UN_ParmTypeHandle parm_type)
Adds the given parm type to the reigstry.
#define UN_API
Definition: UN_API.h:11
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
Definition: UT_UniquePtr.h:39
UT_UniquePtr< UN_ParmType > ParmTypeHandle