ReferenceSaveManager.h

Go to the documentation of this file.
00001 /*******************************************************************************
00002 Copyright 2010 Autodesk, Inc.  All rights reserved. 
00003 This computer source code and related instructions and comments are the unpublished 
00004 confidential and proprietary information of Autodesk, Inc. and are protected under 
00005 applicable copyright and trade secret law.  They may not be disclosed to, copied 
00006 or used by any third party without the prior written consent of Autodesk, Inc.
00007 *******************************************************************************/
00008 
00009 #pragma once
00010 #include "ref.h"
00011 
00013 
00072 class ReferenceSaveManager : public MaxSDK::Util::Noncopyable
00073 {
00074 public:
00076 
00101     class PreSave: public SaveEnumProc {
00102     public:
00103         CoreExport void proc(ReferenceMaker *rmaker); 
00104         CoreExport int terminate(ReferenceMaker *rmaker);  
00105     };
00107 
00113     class PostSave: public SaveEnumProc {
00114     public:
00115         CoreExport void proc(ReferenceMaker *rmaker); 
00116         CoreExport int terminate(ReferenceMaker *rmaker);  
00117     };
00119 
00125     virtual int NumRefs() = 0;
00127 
00147     virtual ReferenceTarget* GetReference(int i, bool usePersistenceTests = true) = 0;
00149 
00155     virtual bool IsRealDependency(ReferenceTarget *theRef) = 0;
00157 
00162     virtual bool ShouldPersistWeakReference(ReferenceTarget *theRef) = 0;
00164 
00170     virtual int NumIndirectRefs() = 0;
00172 
00192     virtual ReferenceTarget* GetIndirectReference(int i, bool usePersistenceTests = true) = 0;
00194 
00200     virtual bool ShouldPersistIndirectReference(ReferenceTarget *theRef) = 0;
00202 
00208     virtual void AddReferenceSlot(int insertAt, ReferenceTarget* theRef) = 0;
00210 
00216     virtual void ReplaceReferenceSlot(int which, ReferenceTarget* theRef) = 0;
00218 
00221     virtual void RemoveReferenceSlot(int which) = 0;
00223 
00229     virtual void AddIndirectReferenceSlot(int insertAt, ReferenceTarget* theRef) = 0;
00231 
00237     virtual void ReplaceIndirectReferenceSlot(int which, ReferenceTarget* theRef) = 0;
00239 
00242     virtual void RemoveIndirectReferenceSlot(int which) = 0;
00244 
00267     virtual void SetReplacementReferenceTarget(ReferenceTarget* theRef) = 0;
00270     virtual bool ReplacementReferenceTargetSpecified() const = 0;
00272 
00276     virtual ReferenceTarget* GetReplacementReferenceTarget() = 0;
00278 
00282     virtual bool ReadyForSave() const = 0;
00284 
00287     virtual void Clear() = 0;
00289     virtual ~ReferenceSaveManager() {}
00290 };
00291