00001 //**************************************************************************/ 00002 // Copyright (c) 1998-2006 Autodesk, Inc. 00003 // All rights reserved. 00004 // 00005 // These coded instructions, statements, and computer programs contain 00006 // unpublished proprietary information written by Autodesk, Inc., and are 00007 // protected by Federal copyright law. They may not be disclosed to third 00008 // parties or copied or duplicated in any form, in whole or in part, without 00009 // the prior written consent of Autodesk, Inc. 00010 //**************************************************************************/ 00011 // DESCRIPTION: Defines an interface for a container of indirect references to 00012 // reference targets. All actions performed instances of this class are undoable. 00013 // AUTHOR: Attila.Szabo - created March.14.2006 00014 //***************************************************************************/ 00015 #pragma once 00016 00017 #include "plugapi.h" 00018 #include "IIndirectRefMaker.h" 00019 #include "IRefTargContainer.h" 00020 00021 00023 #define INDIRECT_REFTARG_CONTAINER_CLASS_ID Class_ID(0x28de7aca, 0x78236a6f) 00024 00028 #define REFMSG_INDIRECT_REFTARG_MONITOR_CONTAINER_TARGET_DELETED REFMSG_USER + 0x78236a6f 00029 00031 /* Instances of this class store a variable number of indirect references, and 00032 zero regular (direct) references. Reference notification messages sent by the 00033 reference targets indirectly referenced by this container are ignored by the 00034 container and are not propagated to the container's dependents. Consequently, 00035 the container does not report itself nor its dependents as dependents of the 00036 indirect reference targets stored by it (see ReferenceTarget::DoEnumDependents). 00037 The indirect references stored in this container to reference targets do not 00038 cause those targets to be persisted when this container is persisted. 00039 00040 This type of container is implemented by 3ds Max. Instances of it can be created 00041 via Interface::CreateInstance(SClass_ID superID, Class_ID classID). 00042 Plugins that need to store a variable number of indirect references to other 00043 plugin objects should create an instance of this container type and make a 00044 reference to it. 00045 00046 3ds Max's implementation of this container type persists itself and its operations 00047 support being undone\redone. 00048 00049 \see IIndirectReferenceMaker, IRefTargContainer, ReferenceTarget 00050 */ 00051 class IIndirectRefTargContainer : public IRefTargContainer, public IIndirectReferenceMaker 00052 { 00053 public: 00054 virtual SClass_ID SuperClassID() { return REF_TARGET_CLASS_ID; } 00055 virtual Class_ID ClassID() { return INDIRECT_REFTARG_CONTAINER_CLASS_ID; } 00056 00058 /* \param [in] refTargToFind - the reference target to look for. Can be NULL. 00059 \return the zero based index of the found reference target within the container. 00060 -1 if the item wasn't found. 00061 */ 00062 virtual int FindFirstItem(ReferenceTarget* refTargToFind) const = 0; 00063 }; 00064