source: trunk/src/testing/app/JuxtaView/FileInfo.h @ 4

Revision 4, 4.4 KB checked in by ajaworski, 13 years ago (diff)

Added modified SAGE sources

Line 
1/******************************************************************************
2 * Program: GlobalCoordinatesToFileMapper
3 * Module:  FileInfo.h
4 * Authors: Nicholas Schwarz, schwarz@evl.uic.edu
5 * Date:    21 September 2004
6 *
7 * Copyright (C) 2004 Electronic Visualization Laboratory,
8 * University of Illinois at Chicago
9 *
10 * All rights reserved.
11 *
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions are met:
14 *
15 *  * Redistributions of source code must retain the above copyright
16 *    notice, this list of conditions and the following disclaimer.
17 *  * Redistributions in binary form must reproduce the above
18 *    copyright notice, this list of conditions and the following disclaimer
19 *    in the documentation and/or other materials provided with the distribution.
20 *  * Neither the name of the University of Illinois at Chicago nor
21 *    the names of its contributors may be used to endorse or promote
22 *    products derived from this software without specific prior written permission.
23 *
24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
27 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
28 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
29 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
30 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
31 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
32 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
33 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
34 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 *
36 * Direct questions, comments etc to schwarz@evl.uic.edu or
37 * http://www.evl.uic.edu/cavern/forum/
38 *
39 *****************************************************************************/
40
41// .NAME FileInfo
42// .SECTION Description
43// FileInfo is a class used to pass data concerning a file's usage. The extent
44// does not refer to the extent of the file in relation to the global space
45// (although it could (it could refer to any extent depending on the context))
46// but to the extent of the file that is of interest.
47
48
49#ifndef FILE_INFO_H
50#define FILE_INFO_H
51
52
53#include <ostream.h>
54#include <stddef.h>
55#include <string.h>
56
57
58class FileInfo {
59
60 public:
61
62  // Description:
63  // Constructor
64  FileInfo();
65
66  // Description:
67  // Get the width and height of the file in its coordinates, usually pixels.
68  void GetDimensions(long* w, long* h);
69
70  // Description:
71  // Get the extent of the file in its coordinates, usually pixels.
72  void GetExtent(long* x, long* y,
73                 long* w, long* h);
74
75  // Description:
76  // Get the file name.
77  const char* GetFileName();
78
79  // Description:
80  // Get the local column and row that the file resides in.
81  void GetLocalPosition(long* col, long* row);
82
83  // Description:
84  // Print itself
85  void PrintSelf(ostream& os);
86
87  // Set the width and height of the file in its coordinates, usually pixels.
88  void SetDimensions(long w, long h);
89
90  // Set the extent of the file in its coordinates, usually pixels.
91  void SetExtent(long x, long y,
92                 long w, long h);
93
94  // Set the height of the extent in the file's coordinates, usually pixels.
95  void SetExtentH(long h);
96
97  // Set the width of the extent in the file's coordinates, usually pixels.
98  void SetExtentW(long w);
99
100  // Set the starting x position of the extent in the file's coordinates,
101  // usually pixels. The upper left corner is (0, 0).
102  void SetExtentX(long x);
103
104  // Set the starting y position of the extent in the file's coordinates,
105  // usually pixels. The upper left corner is (0, 0).
106  void SetExtentY(long y);
107
108  // Set the file name.
109  void SetFileName(const char*);
110
111  // Set the column and row of the file's local position.
112  void SetLocalPosition(long col, long row);
113
114  // Description:
115  // Destructor
116  ~FileInfo();
117
118
119 private:
120
121  // File's dimensions in its coordinate system, usually in pixels.
122  long Dimensions[2];
123
124  // The extent of the file that should be used, given as starting x, y, and
125  // width and height of the extent in the file's coordinate system, usually
126  // in pixels.
127  long Extent[4];
128
129  // File name.
130  char* FileName;
131
132  // The local column and row that the file resides in.
133  long LocalPosition[2];
134
135};
136
137
138#endif
Note: See TracBrowser for help on using the repository browser.