|
OWLNext 7.0
Borland's Object Windows Library for the modern age
|
OC Document class, holds parts & is a owner of views. More...
#include <ocf/ocdoc.h>
Public Member Functions | |
| TOcDocument (TOcApp &app, LPCTSTR fileName=0) | |
| TOcDocument (TOcApp &app, LPCTSTR fileName, IStorage *storageI) | |
| ~TOcDocument () | |
| int | AllocPartID () |
| TOcApp & | GetOcApp () |
Collection management | |
| TOcPartCollection & | GetParts () |
| TOcLinkCollection & | GetLinks () |
| TOcLinkCollection & | GetViews () |
Storage & streaming related | |
| TOcStorage * | GetStorage () |
| void | SetStorage (IStorage *storage, bool remember=true) |
| Set the storage for this document. | |
| void | SetStorage (LPCTSTR path) |
| Set the storage for this document. | |
| bool | SaveToFile (LPCTSTR newName) |
| Perform saveas operation. | |
| bool | RestoreStorage () |
| Restore the original root IStorage before the save operation. | |
Load/Save part information | |
| bool | LoadParts () |
| Loads the parts from the current storage into the PartCollection. | |
| bool | SaveParts (IStorage *storage=0, bool sameAsLoaded=true, bool remember=true) |
| Save the embedded parts to the provided storage. | |
| void | RenameParts (IBRootLinkable *bLDocumentI) |
| void | Close () |
Get/Set active view | |
| TOcView * | GetActiveView () |
| void | SetActiveView (TOcView *view) |
Get/Set document name | |
| owl::tstring | GetName () const |
| void | SetName (const owl::tstring &newName) |
| Notify container that doc pathname has changed. | |
Friends | |
| class _ICLASS | TOcControl |
| class _ICLASS | TOcView |
| class _ICLASS | TOcRemVie |
| ocf::TOcDocument::TOcDocument | ( | TOcApp & | app, |
| LPCTSTR | fileName = 0 ) |
Definition at line 36 of file ocdoc.cpp.
References ocf::TOcStorage::TOcStorage(), ocf::_T(), owl::ToBool(), and TRACEX.
| void ocf::TOcDocument::Close | ( | ) |
Definition at line 321 of file ocdoc.cpp.
References ocf::TOcPart::Close(), and ocf::TOcLinkView::Disconnect().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| bool ocf::TOcDocument::LoadParts | ( | ) |
Loads the parts from the current storage into the PartCollection.
Return false if a serious error occurs. Having no part stream at all is OK.
Clear the part collection
PartCollection.Clear(); ///DR clear before make a new one.
There is a case when clearing now causes a crash
Definition at line 230 of file ocdoc.cpp.
References ocf::TOcPart::TOcPart(), ocf::HRSucceeded(), ocf::TOcStream::Read(), and owl::to_tstring().
| void ocf::TOcDocument::RenameParts | ( | IBRootLinkable * | bLDocumentI | ) |
Definition at line 301 of file ocdoc.cpp.
References ocf::TOcPart::GetName(), ocf::HRSucceeded(), ocf::IBLinkable::OnRename(), and ocf::TOcPart::QueryInterface().
| bool ocf::TOcDocument::RestoreStorage | ( | ) |
| bool ocf::TOcDocument::SaveParts | ( | IStorage * | storage = 0, |
| bool | sameAsLoaded = true, | ||
| bool | remember = true ) |
Save the embedded parts to the provided storage.
'remember' flag is not really used here, as our save/restore is done outside here.
Definition at line 155 of file ocdoc.cpp.
References ocf::TOcStorage::TOcStorage(), CHECK, ocf::TOcPart::FinishLoading(), ocf::TOcPart::GetName(), ocf::HRSucceeded(), IStorage, owl::TString::Length(), ocf::TOcPart::Save(), owl::ToBool(), and ocf::TOcStream::Write().
| bool ocf::TOcDocument::SaveToFile | ( | LPCTSTR | newName | ) |
Perform saveas operation.
Definition at line 141 of file ocdoc.cpp.
References ocf::TOcStorage::GetIStorage(), PRECONDITION, and SaveParts().
| void ocf::TOcDocument::SetActiveView | ( | TOcView * | view | ) |
| void ocf::TOcDocument::SetName | ( | const owl::tstring & | newName | ) |
| void ocf::TOcDocument::SetStorage | ( | IStorage * | storage, |
| bool | remember = true ) |
Set the storage for this document.
Definition at line 92 of file ocdoc.cpp.
References ocf::TOcStorage::TOcStorage(), and IStorage.
| void ocf::TOcDocument::SetStorage | ( | LPCTSTR | path | ) |
Set the storage for this document.
Definition at line 114 of file ocdoc.cpp.
References ocf::TOcStorage::TOcStorage(), and SetName().
|
friend |
Definition at line 102 of file ocdoc.h.
References _ICLASS, and TOcControl.
|
friend |
|
friend |