~ubuntu-branches/ubuntu/saucy/sflphone/saucy

« back to all changes in this revision

Viewing changes to sflphone-common/libs/dbus-c++/tools/generator_utils.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Francois Marier
  • Date: 2010-12-24 16:33:55 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20101224163355-tkvvikqxbrbav6up
Tags: 0.9.11-1
* New upstream release
* Add new build dependencies on libwebkit-dev and libyaml-dev

* Bump Standards-Version up to 3.9.1
* Bump debhelper compatibility to 8
* Patch another typo in the upstream code (lintian notice)

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
#include <cassert>\n\
43
43
";
44
44
 
45
 
                            void underscorize (string &str)
46
 
                            {
 
45
                            void underscorize (string &str) {
47
46
                            for (unsigned int i = 0; i < str.length(); ++i) {
48
47
                            if (!isalpha (str[i]) && !isdigit (str[i])) str[i] = '_';
49
48
                            }
50
49
                            }
51
50
 
52
 
                            string stub_name (string name)
53
 
                            {
 
51
                            string stub_name (string name) {
54
52
                            underscorize (name);
55
53
 
56
54
                            return "_" + name + "_stub";
57
55
                            }
58
56
 
59
 
                            const char *atomic_type_to_string (char t)
60
 
                            {
 
57
                            const char *atomic_type_to_string (char t) {
61
58
 
62
59
                            static struct {
63
60
                            char type;
88
85
                            return atos[i].name;
89
86
                            }
90
87
 
91
 
                            void _parse_signature (const string &signature, string &type, unsigned int &i)
92
 
                            {
 
88
                            void _parse_signature (const string &signature, string &type, unsigned int &i) {
93
89
                            for (; i < signature.length(); ++i) {
94
90
                            switch (signature[i]) {
95
91
 
164
160
                            }
165
161
                            }
166
162
 
167
 
                            string signature_to_type (const string &signature)
168
 
                            {
 
163
                            string signature_to_type (const string &signature) {
169
164
                            string type;
170
165
                            unsigned int i = 0;
171
166
                            _parse_signature (signature, type, i);