Slicer  5.3
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkMRMLTableSQLiteStorageNode.h
Go to the documentation of this file.
1 /*==============================================================================
2 
3  Program: 3D Slicer
4 
5  Portions (c) Copyright 2015 Brigham and Women's Hospital (BWH) All Rights Reserved.
6 
7  See COPYRIGHT.txt
8  or http://www.slicer.org/copyright/copyright.txt for details.
9 
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15 
16  This file was originally developed by Andras Lasso (PerkLab, Queen's
17  University) and Kevin Wang (Princess Margaret Hospital, Toronto) and was
18  supported through OCAIRO and the Applied Cancer Research Unit program of
19  Cancer Care Ontario.
20 
21 ==============================================================================*/
22 
23 #ifndef __vtkMRMLTableSQLightStorageNode_h
24 #define __vtkMRMLTableSQLightStorageNode_h
25 
26 #include "vtkMRMLStorageNode.h"
27 
34 
35 class vtkSQLiteDatabase;
36 
37 class VTK_MRML_EXPORT vtkMRMLTableSQLiteStorageNode : public vtkMRMLStorageNode
38 {
39 public:
40  static vtkMRMLTableSQLiteStorageNode *New();
42  void PrintSelf(ostream& os, vtkIndent indent) override;
43 
44  vtkMRMLNode* CreateNodeInstance() override;
45 
47  const char* GetNodeTagName() override {return "TableSQLightStorage";}
48 
50  bool CanReadInReferenceNode(vtkMRMLNode *refNode) override;
51 
53  vtkSetStringMacro(Password);
54  vtkGetStringMacro(Password);
55 
57  vtkSetStringMacro(TableName);
58  vtkGetStringMacro(TableName);
59 
61  static int DropTable(char *tableName, vtkSQLiteDatabase* database);
62 
63 protected:
68 
70  void InitializeSupportedReadFileTypes() override;
71 
73  void InitializeSupportedWriteFileTypes() override;
74 
76  int ReadDataInternal(vtkMRMLNode *refNode) override;
77 
79  int WriteDataInternal(vtkMRMLNode *refNode) override;
80 
81  char *TableName;
82  char *Password;
83 };
84 
85 #endif
vtkMRMLNode * CreateNodeInstance() override=0
Create instance of the default node. Like New only virtual.
virtual int ReadDataInternal(vtkMRMLNode *refNode)
virtual void InitializeSupportedReadFileTypes()
void operator=(const vtkMRMLStorageNode &)
void PrintSelf(ostream &os, vtkIndent indent) override
const char * GetNodeTagName() override
Get node XML tag name (like Storage, Model)
A superclass for other storage nodes.
virtual void InitializeSupportedWriteFileTypes()
virtual int WriteDataInternal(vtkMRMLNode *refNode)
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167
virtual bool CanReadInReferenceNode(vtkMRMLNode *refNode)=0