File: lname.3

package info (click to toggle)
erlang-manpages 1%3A12.b.3-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 4,188 kB
  • ctags: 2
  • sloc: makefile: 68; perl: 30; sh: 15
file content (174 lines) | stat: -rw-r--r-- 3,052 bytes parent folder | download
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
.TH lname 3 "orber  3.6.9" "Ericsson AB" "ERLANG MODULE DEFINITION"
.SH MODULE
lname \- Interface that supports the name pseudo-objects\&.
.SH DESCRIPTION
.LP
This interface is a part of the names library which is used to hide the representation of names\&. In Orbers Erlang mapping the pseudo-object names and the real IDL names have the same representation but it is desirable that the clients uses the names library so they will not be dependent of the representation\&. The lname interface supports handling of names e\&.g\&. adding and removing name components\&.
.LP
Note that the lname interface in orber does not contain a destroy function because the Names are represented as standard Erlang lists and therefor will be removed by the garbage collector when not in use\&.
.LP
The type \fINameComponent\fR used below is defined as:

.nf
      -record(\&'CosNaming_NameComponent\&', {id, kind=""})\&.
    
.fi
.LP
\fIid\fR and \fIkind\fR are strings\&. 
.LP
The record is defined in the file \fICosNaming\&.hrl\fR and it is included with:

.nf
      -include_lib("orber/COSS/CosNaming/CosNaming\&.hrl")\&.
    
.fi

.SH EXPORTS
.LP
.B
create() -> Return
.br
.RS
.TP
Types
Return = [NameComponent]
.br
.RE
.RS
.LP
This function returns a new name\&.
.RE
.LP
.B
insert_component(Name, N, NameComponent) -> Return
.br
.RS
.TP
Types
Name = [NameComponent]
.br
N = int()
.br
Return = Name
.br
.RE
.RS
.LP
This function returns a name where the new name component has been inserted as component \fIN\fR in Name\&.
.RE
.LP
.B
get_component(Name, N) -> Return
.br
.RS
.TP
Types
Name = [NameComponent]
.br
N = int()
.br
Return = NameComponent
.br
.RE
.RS
.LP
This function returns the \fIN:th\fR name component in Name\&.
.RE
.LP
.B
delete_component(Name, N) -> Return
.br
.RS
.TP
Types
Name = [NameComponent]
.br
N = int()
.br
Return = Name
.br
.RE
.RS
.LP
This function deletes the \fIN:th\fR name component from Name and returns the new name\&.
.RE
.LP
.B
num_components(Name) -> Return
.br
.RS
.TP
Types
Name = [NameComponent]
.br
Return = int()
.br
.RE
.RS
.LP
This function returns a the number of name components in Name\&.
.RE
.LP
.B
equal(Name1, Name2) -> Return
.br
.RS
.TP
Types
Name1 = Name2 = [NameComponent]
.br
Return = bool()
.br
.RE
.RS
.LP
This function returns true if the two names are equal and false otherwise\&.
.RE
.LP
.B
less_than(Name1, Name2) -> Return
.br
.RS
.TP
Types
Name1 = Name2 = [NameComponent]
.br
Return = bool()
.br
.RE
.RS
.LP
This function returns true if Name1 are lesser than Name2 and false otherwise\&.
.RE
.LP
.B
to_idl_form(Name) -> Return
.br
.RS
.TP
Types
Name = [NameComponent]
.br
Return = Name
.br
.RE
.RS
.LP
This function just checks if Name is a correct IDL name before returning it because the name representation is the same for pseudo and IDL names in orber\&.
.RE
.LP
.B
from_idl_form(Name) -> Return
.br
.RS
.TP
Types
Name = [NameComponent]
.br
Return = Name
.br
.RE
.RS
.LP
This function just returns the Name because the name representation is the same for pseudo and IDL names in orber\&.
.RE