|
Carbide.c++ | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IModel<View>
This manages a single file's contents and provides "views" onto its contents and resolves changes to such views to rewrite the contents.
Instances of this interface are possibly shared and their documents managed by an IModelProvider.
BIG FAT WARNING: Upcasting to IOwnedModel to access the document is not allowed unless you are 100% sure you just created the model yourself and have not yet relinquished it to the provider!
Method Summary | |
---|---|
void |
addListener(IModelListener listener)
Add listener, ignore duplicates |
View |
createView(IViewConfiguration configuration)
Creates a view onto the contents of the model using the given configuration and filter. |
IModelProvider<IOwnedModel<View>,IModel<View>> |
getModelProvider()
Get the model provider owning this model, if any. |
IPath |
getPath()
Get full filesystem path to file |
IView[] |
getViews()
Get a copy of the active views on model |
void |
removeListener(IModelListener listener)
Remove listener, ignore missing |
Method Detail |
---|
IPath getPath()
View createView(IViewConfiguration configuration)
IView[] getViews()
void addListener(IModelListener listener)
void removeListener(IModelListener listener)
IModelProvider<IOwnedModel<View>,IModel<View>> getModelProvider()
Registering a model via @link{IModelProvider#registerModel()} or retrieving one via @link{IModelProvider#getSharedModel()} will set the model's provider.
|
Carbide.c++ | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |