9#if !defined(OWL_FILEDOC_H)
13#if defined(BI_HAS_PRAGMA_ONCE)
52 bool Open(
int mode, LPCTSTR path=0);
55 TInStream* InStream(
int mode, LPCTSTR strmId=0);
57 TOutStream* OutStream(
int mode, LPCTSTR strmId=0);
59 bool Commit(
bool force =
false);
60 bool Revert(
bool clear =
false);
63 int FindProperty(LPCTSTR name);
65 int PropertyFlags(
int index);
66 LPCTSTR PropertyName(
int index);
68 int GetProperty(
int index,
void * dest,
int textlen=0);
69 bool SetProperty(
int index,
const void * src);
73 bool Open(HFILE fhdl);
76 HFILE OpenThisFile(
int omode,
const tstring& fileName, std::streampos* pseekpos);
77 void CloseThisFile(HFILE fhdl,
int omode);
86 FILETIME FileCreateTime;
87 FILETIME FileAccessTime;
88 FILETIME FileUpdateTime;
109 TDocument(parent), FHdl(HFILE_ERROR), InfoPresent(false)
An abstract base class, TDocument is the base class for all document objects and serves as an interfa...
virtual TInStream * InStream(int mode, LPCTSTR strmId=nullptr)
Generic input for the particular storage medium, InStream returns a pointer to a TInStream.
TDocument(TDocument *parent=nullptr)
Although you do not create a TDocument object directly, you must call the constructor when you create...
virtual int FindProperty(LPCTSTR name)
return property index
virtual bool Open(int mode, LPCTSTR path=nullptr)
Opens the document using the path specified by DocPath.
@ NextProperty
Next index to be used by derived class.
virtual bool IsOpen()
Checks to see if the document has any streams in its stream list.
virtual TOutStream * OutStream(int mode, LPCTSTR strmId=nullptr)
Generic output for the particular storage medium, OutStream returns a pointer to a TOutStream.
Derived from TDocument, TFileDocument opens and closes views and provides stream support for views.
Derived from TStream and istream, TInStream is a base class used to define input streams for document...
Derived from TStream and ostream, TOutStream is a base class used to create output storage streams fo...
Definition of classes TDocument, TView, TWindowView, TStream, TInStream, TOutStream.
#define DECLARE_STREAMABLE_OWL(cls, ver)
#define DECLARE_STREAMABLE_INLINES(cls)
~TFileDocument()
Destroys a TFileDocument object.
TFileDocProp
Contains constants that define the following properties of the document:
int PropertyCount()
Return the number of property support by this document.
friend class TFileOutStream
bool IsOpen()
Is nonzero if the document or any streams are open.
friend class TFileInStream
TFileDocument(TDocument *parent=0)
Constructs a TFileDocument object with the optional parent document.
@ FileHandle
The platform file handle (HFILE if Windows).
@ ModifyTime
The time the view or document was modified (FILETIME).
@ AccessTime
The time the view or document was last accessed (FILETIME).
@ CreateTime
The time the view or document was created (FILETIME).
@ StorageSize
An unsigned long containing the storage size (ulong).
Object Windows Library (OWLNext Core).