2 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
8 #include <Referenceable.h>
14 class SourceFileOwner
{
16 virtual ~SourceFileOwner();
18 virtual void SourceFileUnused(SourceFile
* sourceFile
) = 0;
19 virtual void SourceFileDeleted(SourceFile
* sourceFile
) = 0;
24 class SourceFile
: public BReferenceable
{
26 SourceFile(SourceFileOwner
* owner
);
29 status_t
Init(const char* path
);
31 int32
CountLines() const;
32 const char* LineAt(int32 index
) const;
33 int32
LineLengthAt(int32 index
) const;
36 virtual void LastReferenceReleased();
39 SourceFileOwner
* fOwner
;
47 #endif // SOURCE_FILE_H