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

Annotation of /trunk/ascxx/symchar.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1699 - (hide annotations) (download) (as text)
Sat Jan 5 02:49:48 2008 UTC (16 years, 9 months ago) by jpye
Original Path: trunk/pygtk/symchar.h
File MIME type: text/x-chdr
File size: 1088 byte(s)
Added operator< to SymChar class (C++).
Added toString method to Dimensions class (C++).
Fixed close-button behaviour in Solver Reporter dialog (Python).
Added Library::getUnits to get list of all units of measurement in use (C++).
Added Library::getRealAtomTypes to get list of all real atomic types (C++).
Removed duplicated class definition for Dimensions in ascpy.i (C++).
Added __str__ to Python wrapping of Dimensions type.
Started working on populating data fields in UnitsDialog (Python).
Default constructor for Dimensions object now creates 'wildcard' dimension.
Cleared contents of library.i (should delete it actually).
Added Type::isFundamental (C++).
Tidied find.h formatting, #includes.

1 johnpye 132 #ifndef ASCXX_SYMCHAR_H
2 johnpye 480 #define ASCXX_SYMCHAR_H
3 johnpye 132
4     #include <iostream>
5     #include <string>
6    
7 johnpye 480 #include "config.h"
8 johnpye 132 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 jpye 1699 bool operator<(const SymChar &) const;
36 johnpye 132
37     const char *toString() const;
38     const symchar *getInternalType() const;
39     };
40    
41     std::ostream& operator << (std::ostream& os, const SymChar& s);
42    
43     #endif

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