/[ascend]/trunk/pygtk/symchar.h
ViewVC logotype

Contents of /trunk/pygtk/symchar.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 532 - (show annotations) (download) (as text)
Mon Apr 24 02:23:08 2006 UTC (14 years, 2 months ago) by johnpye
File MIME type: text/x-chdr
File size: 1048 byte(s)
Removed 'interface' directory in trunk/pygtk/interface (moved everything up a level)
Made corresponding changes to SCons* and spec files.
1 #ifndef ASCXX_SYMCHAR_H
2 #define ASCXX_SYMCHAR_H
3
4 #include <iostream>
5 #include <string>
6
7 #include "config.h"
8 extern "C"{
9 #include <utilities/ascConfig.h>
10 #include <compiler/compiler.h>
11 #include <compiler/symtab.h>
12 #include <compiler/instance_name.h>
13 }
14
15 /**
16 A container for ASCEND strings, used to ensure
17 that two identical strings created via the SymChar interface
18 will only be stored once in memory, and can be tested for
19 equality using pointer comparison alone.
20
21 @TODO @bug FIXME There is a problem with the calling conventions of char * and symchar*
22 -- C++ can't tell which one you're trying to use.
23 */
24 class SymChar{
25 private:
26 const symchar *sc;
27 public:
28 //SymChar();
29 SymChar(const std::string &name);
30 SymChar(const char *name);
31 SymChar(const symchar *name); // never gets used
32 SymChar(const SymChar &);
33 SymChar(const struct InstanceName &);
34 bool operator==(const SymChar &) const;
35
36 const char *toString() const;
37 const symchar *getInternalType() const;
38 };
39
40 std::ostream& operator << (std::ostream& os, const SymChar& s);
41
42 #endif

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22