HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CHOP_Notes.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: CHOP_Notes.h ( CHILI Library, C++)
7  *
8  * COMMENTS:
9  *
10  * A list of index notes overlayed on the graph
11  */
12 
13 #ifndef __CHOP_Notes__
14 #define __CHOP_Notes__
15 
16 #include "CHOP_API.h"
17 
18 #include <UT/UT_FloatArray.h>
19 #include <UT/UT_ValArray.h>
20 
23 
24 class UT_IStream;
25 class UT_OStream;
26 
28 {
29 
30 public:
31 
32  CHOP_Notes();
33  ~CHOP_Notes();
34 
35  int putNote(fpreal t, int index);
36  int putNote(int index, const char *);
37  int putNote(fpreal t, const char *);
38 
39  const char *getNote(int index) const;
40  const char *getNote(fpreal t0) const;
41  int getNotes(fpreal t0, fpreal t1,
42  CHOP_NoteList &clist,
43  CHOP_TimeList &tlist) const;
44  void clearNotes();
45 
46  bool save(UT_OStream &os);
47  bool load(UT_IStream &is);
48 
49  int64 getMemoryUsage(bool inclusive) const;
50 
51 private:
52 
53  UT_ValArray<char *> myStrings;
54  UT_FprealArray myTimes;
55 
56  void reset();
57  int removeNote(fpreal t);
58  int removeNote(int idx);
59 
60  int findNote(fpreal t) const;
61  int findOrInsertNote(fpreal t);
62 
63 };
64 
65 #endif
66 
#define CHOP_API
Definition: CHOP_API.h:10
UT_ValArray< const char * > CHOP_NoteList
Definition: CHOP_Notes.h:21
GLboolean reset
Definition: glad.h:5138
long long int64
Definition: SYS_Types.h:116
UT_FprealArray CHOP_TimeList
Definition: CHOP_Notes.h:22
GLdouble t
Definition: glad.h:2397
fpreal64 fpreal
Definition: SYS_Types.h:277
GLuint index
Definition: glcorearb.h:786