Panda3D
interrogateMakeSeq.h
1 // Filename: interrogateMakeSeq.h
2 // Created by: drose (15Sep09)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef INTERROGATEMAKESEQ_H
16 #define INTERROGATEMAKESEQ_H
17 
18 #include "dtoolbase.h"
19 
20 #include "interrogateComponent.h"
21 
22 class IndexRemapper;
23 
24 ////////////////////////////////////////////////////////////////////
25 // Class : InterrogateMakeSeq
26 // Description : Represents a synthetic method created via the
27 // MAKE_SEQ() macro.
28 ////////////////////////////////////////////////////////////////////
29 class EXPCL_DTOOLCONFIG InterrogateMakeSeq : public InterrogateComponent {
30 public:
31  INLINE InterrogateMakeSeq(InterrogateModuleDef *def = NULL);
32  INLINE InterrogateMakeSeq(const InterrogateMakeSeq &copy);
33  INLINE void operator = (const InterrogateMakeSeq &copy);
34 
35  INLINE TypeIndex get_class() const;
36  INLINE const string &get_seq_name() const;
37  INLINE const string &get_num_name() const;
38  INLINE const string &get_element_name() const;
39 
40  void output(ostream &out) const;
41  void input(istream &in);
42 
43  void remap_indices(const IndexRemapper &remap);
44 
45 private:
46  TypeIndex _class;
47  string _seq_name;
48  string _num_name;
49  string _element_name;
50 
51  friend class InterrogateBuilder;
52 };
53 
54 INLINE ostream &operator << (ostream &out, const InterrogateMakeSeq &make_seq);
55 INLINE istream &operator >> (istream &in, InterrogateMakeSeq &make_seq);
56 
57 #include "interrogateMakeSeq.I"
58 
59 #endif
This class manages a mapping of integers to integers.
Definition: indexRemapper.h:33
void input(istream &in)
Reads the data file as previously formatted by output().
void output(ostream &out) const
Formats the component for output to a data file.
Represents a synthetic method created via the MAKE_SEQ() macro.
The base class for things that are part of the interrogate database.