객체 저장과 불러오기
객체 저장과 불러오기 프로세스 최적화하기
클래스에 대한 특정 메서드를 구현하여 객체를 저장하고 불러오는 프로세스를 사용자 지정합니다. 이러한 메서드는 버전 호환성을 향상시키고, 초기화 종속성을 방지하며, 기능을 불러온 객체로 복원할 수 있습니다.
도움말 항목
객체에 관한 작업을 저장하고 불러오는 방법
- 객체에 대한 저장 및 불러오기 프로세스
MATLAB®은 불러온 객체가 알려진 상태에 있도록 저장 및 불러오기 작업에서 객체를 처리합니다. - Modify the Save and Load Process
Modify the save and load process to provide class version compatibility. - Basic saveobj and loadobj Pattern
Use these basic programming patterns to implement custom save and load processes.
저장하고 불러오는 방법 사용자 지정하기
- Reduce MAT-File Size for Saved Objects
Specifying default values for properties in the class definition can reduce MAT-file size when saving multiple objects of the same class. - Improve Version Compatibility with Default Values
Using default values when adding properties to a class definition ensures that objects defined with previous versions have appropriate values when loaded. - Save Object Data to Recreate Graphics Objects
It is more efficient to save data and recreated graphics than to save the whole graphics hierarchy in the MAT-file. - Avoid Property Initialization Order Dependency
Avoid initialization order dependency by defining set methods for dependent properties. - Maintain Class Compatibility
Use hidden dependent properties to maintain class compatibility. - Initialize Objects When Loading
EnablingConstructOnLoad
allows object modification in the constructor when you do not want to implement aloadobj
method. - Save and Load Objects from Class Hierarchies
Class can call theloadobj
andsaveobj
methods defined by superclasses in the class hierarchy from their ownloadobj
andsaveobj
methods. - Restore Listeners
You can restore property listeners from theloadobj
method.