3ds Max C++ API Reference
GenSubObjType Class Reference

This class provides a generic implementation for sub-object types. More...

#include <object.h>

+ Inheritance diagram for GenSubObjType:

Public Member Functions

 GenSubObjType (const MSTR &nm, const MSTR &pFilePrefix, int idx)
 Constructor. More...
 
 GenSubObjType (int idx)
 This constructor assumes that the icons are in either UI/icons/SubObjectIcons_16i.bmp or SubObjectIcons_24i.bmp depending on which size icons are in use by the system. More...
 
CoreExport ~GenSubObjType ()
 Destructor. More...
 
void SetName (const MSTR &nm)
 Sets the name for this sub-object type. More...
 
const MSTRGetName ()
 Returns the name for this sub-object type. More...
 
CoreExport MaxIconGetIcon ()
 Returns the icon for this sub-object type. More...
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor. More...
 
virtual UtilExport BaseInterfaceGetInterface (Interface_ID id)
 
template<class InterfaceType >
InterfaceType * GetTypedInterface ()
 

Additional Inherited Members

- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 

Detailed Description

This class provides a generic implementation for sub-object types.

Instead of having to create a sub-class of ISubObjType the constructors of this class may be used to initialize private data members of the class. Then implementations of the GetName() and GetIcon() methods of ISubObjType are provided which simply return the data members. This SubObjectType will either use the subObjectIcons_16i.bmp and SubObjectIcons_16a.bmp bitmaps in the UI/icons directory (for the GenSubObjType(int idx) constructor), or any other bmp file that is specified in the GenSubObjType(const MCHAR nm, const MCHAR pFilePrefix, int idx) constructor. The bitmap files have to reside in the UI/icons directory. All methods of this class are implemented by the System.

See also
Class ISubObjType, Class BaseObject, Class MaxIcon

Constructor & Destructor Documentation

◆ GenSubObjType() [1/2]

GenSubObjType ( const MSTR nm,
const MSTR pFilePrefix,
int  idx 
)
inline

Constructor.

The private data members are inialized to the values passed and the corresponding Get methods of this class will return these data members.

Parameters
nmThe name for this sub-object type.
pFilePrefixThe BMP imagelist file name prefix for this sub-object type. This is the file name, without the extension, and with the assumption that the file is in the ui/icons directory. For example specifying _M("SubObjectIcons") for this parameter indicates the file UI/icons/SubObjectIcons_16i.bmp if the small icons are in use and SubObjectIcons_24i.bmp if the large icons are in use.
idxThis is the one based index into the image list of the icon to use.
6155 : name(nm), mIcon(NULL), mIdx(idx), mFilePrefix(pFilePrefix) {}
#define NULL
Definition: autoptr.h:18

◆ GenSubObjType() [2/2]

GenSubObjType ( int  idx)
inline

This constructor assumes that the icons are in either UI/icons/SubObjectIcons_16i.bmp or SubObjectIcons_24i.bmp depending on which size icons are in use by the system.

In this case only the index into the image list is required.

Parameters
idxThis is the one based index into the image list of the icon to use.
6162 : mIcon(NULL), mIdx(idx), mFilePrefix(_M("SubObjectIcons")) {}
#define _M(x)
Used to wrap string literals.
Definition: strbasic.h:67

◆ ~GenSubObjType()

Destructor.

Member Function Documentation

◆ SetName()

void SetName ( const MSTR nm)
inline

Sets the name for this sub-object type.

Parameters
nmThe name to set.
6168 {name = nm;}

◆ GetName()

const MSTR& GetName ( )
inlinevirtual

Returns the name for this sub-object type.

This is the implementation of the ISubObjType method.

Implements ISubObjType.

6171 { return name; }

◆ GetIcon()

CoreExport MaxIcon* GetIcon ( )
virtual

Returns the icon for this sub-object type.

This is the implementation of the ISubObjType method.

Implements ISubObjType.