File.h
1 //##################################################################################################
2 //
3 // Ceetron Export
4 // Component: VTFx
5 //
6 // --------------------------------------------------------------------------------------------
7 // Copyright (C) 2015, Ceetron AS
8 // This is UNPUBLISHED PROPRIETARY SOURCE CODE of Ceetron AS. The contents of this file may
9 // not be disclosed to third parties, copied or duplicated in any form, in whole or in part,
10 // without the prior written permission of Ceetron AS.
11 //##################################################################################################
12 
13 #pragma once
14 
15 #include "CeeVTFx/Base.h"
16 #include "CeeVTFx/Block.h"
17 #include "CeeVTFx/FileSettings.h"
18 #include "CeeVTFx/Case.h"
19 
20 #include "CeeCore/PtrRef.h"
21 
22 
23 class VTFxAccess;
24 
25 namespace cee {
26 namespace vtfx {
27 
28 class Database;
29 
30 //==================================================================================================
31 //
32 //
33 //
34 //==================================================================================================
35 class CEE_VTFX_EXPORT File : public RefCountedObject
36 {
37 public:
38  File();
39  virtual ~File();
40 
41  bool open(const Str& filename);
42  bool create(const Str& filename, const FileSettings& fileSettings);
43  bool openForAppend(const Str& filename);
44  bool close();
45 
46  size_t userTextFileCount() const;
47  Str userTextFileName(size_t textFileIndex) const;
48  Str userTextFileContent(size_t textFileIndex) const;
49  bool addUserTextFile(const Str& filename, const Str& content);
50 
51  size_t databaseCount() const;
52  int unusedDatabaseId() const;
53  Database* database(size_t databaseIndex);
54 
55  size_t fileCaseCount() const;
56  int unusedFileCaseId() const;
57  const Case* fileCase(size_t caseIndex) const;
58  Case* fileCase(size_t caseIndex);
59 
60  const FileSettings* settings() const;
61 
62  static bool isVTFxFile(const Str& filename);
63 
64 public:
65  VTFxAccess* internal_access();
66 
67 private:
68  friend class Database;
69  friend class Case;
70 
71  CEE_PRIVATE_IMPL(File);
72  CEE_DISALLOW_COPY_AND_ASSIGN(File);
73 };
74 
75 }
76 }
Namespace cee contains all functionality and structures under the Core component. ...
Definition: AppAssert.cpp:18
A VTFx file.
Definition: File.h:35
A VTFx database. The class represents a database of data blocks.
Definition: Database.h:32
A general unicode based string class.
Definition: Str.h:28
Base class for all reference counted objects with built-in support for intrusive reference counting...
Definition: RefCountedObject.h:34
File settings for VTFx files.
Definition: FileSettings.h:33
A VTFx case. The class represents a case, i.e. the specific visualization of a VTFx database...
Definition: Case.h:31