File: ruby_naming.i

package info (click to toggle)
renderdoc 1.2%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 79,584 kB
  • sloc: cpp: 491,671; ansic: 285,823; python: 12,617; java: 11,345; cs: 7,181; makefile: 6,703; yacc: 5,682; ruby: 4,648; perl: 3,461; php: 2,119; sh: 2,068; lisp: 1,835; tcl: 1,068; ml: 747; xml: 137
file content (107 lines) | stat: -rw-r--r-- 1,565 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
%module ruby_naming

%predicate predicateMethod();
%bang bangMethod();

/* This gets mapped to a constant */
%constant int constant1 = 1;

/* This gets mapped to a constant */
#define constant2 2

%immutable TestConstants::constant8;

%inline %{

/* ============  Test Constants Names ============== */

/* This gets mapped to a constant */
#define constant3 3

/* These are all singleton methods */
const int constant4[2] = {10, 20};
const int constant5 = 5;
static const int constant6 = 6;


class TestConstants {
public:
  TestConstants() : constant7(7) {}
  
  /* This gets mapped to a method */
  const int constant7;
  
  /* This gets mapped to a singleton method, but this is not legal C++ */
  static const int constant8;
  
  /* This gets mapped to a method, but this it not legal C++ */
  /*const int constant9 = 9;*/
  
  /* This gets mapped to a constant */
  static const int constant10 = 10;
};

const int TestConstants::constant8 = 8;

const TestConstants * constant11[5];


/* ============  Test Enum ============== */
typedef enum {Red, Green, Blue} Colors;


/* ============  Test Method Names ============== */
class my_class {
public:
	int methodOne()
	{
		return 1;
	}
	
  int MethodTwo()
	{
		return 2;
	}
	
  int Method_THREE()
	{
		return 3;
	}

  int Method44_4()
	{
		return 4;
	}
	
  bool predicateMethod()
	{
		return true;
	}
	
  bool bangMethod()
	{
		return true;
	}
  int begin() 
  {
    return 1;
  }

  int end() 
  {
    return 1;
  }
  
};

%}

%inline 
{
  template <class _Type>
  struct A 
  {
  };
}

%template(A_i) A<int>;