Alexander Afanasyev | ce6daac | 2013-11-26 19:49:37 -0800 | [diff] [blame^] | 1 | .. _ForwardingFlags: |
| 2 | |
Alexander Afanasyev | 1122501 | 2013-11-21 23:11:10 -0800 | [diff] [blame] | 3 | ForwardingFlags Class |
| 4 | ===================== |
| 5 | |
| 6 | A ForwardingFlags object holds the flags which specify how the forwarding daemon should forward an interest for a registered prefix. We use a separate ForwardingFlags object to retain future compatibility if the daemon forwarding bits are changed, amended or deprecated. |
| 7 | |
| 8 | :[C++]: |
| 9 | Namespace: `ndn` |
| 10 | |
| 11 | ForwardingFlags Constructor |
| 12 | |
| 13 | Create a new ForwardingFlags with "active" and "childInherit" set and all other flags cleared. |
| 14 | |
| 15 | :[C++]: |
| 16 | |
| 17 | .. code-block:: c++ |
| 18 | |
| 19 | ForwardingFlags(); |
| 20 | |
| 21 | :[JavaScript]: |
| 22 | |
| 23 | .. code-block:: javascript |
| 24 | |
| 25 | var ForwardingFlags = function ForwardingFlags() |
| 26 | |
| 27 | ForwardingFlags.getActive Method |
| 28 | -------------------------------- |
| 29 | |
| 30 | Get the value of the "active" flag. |
| 31 | |
| 32 | :[C++]: |
| 33 | |
| 34 | .. code-block:: c++ |
| 35 | |
| 36 | bool getActive() const; |
| 37 | |
| 38 | :[JavaScript]: |
| 39 | |
| 40 | .. code-block:: javascript |
| 41 | |
| 42 | ForwardingFlags.prototype.getActive = function() |
| 43 | |
| 44 | :Returns: |
| 45 | |
| 46 | true if the flag is set, false if it is cleared. |
| 47 | |
| 48 | ForwardingFlags.getChildInherit Method |
| 49 | -------------------------------------- |
| 50 | |
| 51 | Get the value of the "childInherit" flag. |
| 52 | |
| 53 | :[C++]: |
| 54 | |
| 55 | .. code-block:: c++ |
| 56 | |
| 57 | bool getChildInherit() const; |
| 58 | |
| 59 | :[JavaScript]: |
| 60 | |
| 61 | .. code-block:: javascript |
| 62 | |
| 63 | ForwardingFlags.prototype.getChildInherit = function() |
| 64 | |
| 65 | :Returns: |
| 66 | |
| 67 | true if the flag is set, false if it is cleared. |
| 68 | |
| 69 | ForwardingFlags.getAdvertise Method |
| 70 | ----------------------------------- |
| 71 | |
| 72 | Get the value of the "advertise" flag. |
| 73 | |
| 74 | :[C++]: |
| 75 | |
| 76 | .. code-block:: c++ |
| 77 | |
| 78 | bool getAdvertise() const; |
| 79 | |
| 80 | :[JavaScript]: |
| 81 | |
| 82 | .. code-block:: javascript |
| 83 | |
| 84 | ForwardingFlags.prototype.getAdvertise = function() |
| 85 | |
| 86 | :Returns: |
| 87 | |
| 88 | true if the flag is set, false if it is cleared. |
| 89 | |
| 90 | ForwardingFlags.getLast Method |
| 91 | ------------------------------ |
| 92 | |
| 93 | Get the value of the "last" flag. |
| 94 | |
| 95 | :[C++]: |
| 96 | |
| 97 | .. code-block:: c++ |
| 98 | |
| 99 | bool getLast() const; |
| 100 | |
| 101 | :[JavaScript]: |
| 102 | |
| 103 | .. code-block:: javascript |
| 104 | |
| 105 | ForwardingFlags.prototype.getLast = function() |
| 106 | |
| 107 | :Returns: |
| 108 | |
| 109 | true if the flag is set, false if it is cleared. |
| 110 | |
| 111 | ForwardingFlags.getCapture Method |
| 112 | --------------------------------- |
| 113 | |
| 114 | Get the value of the "capture" flag. |
| 115 | |
| 116 | :[C++]: |
| 117 | |
| 118 | .. code-block:: c++ |
| 119 | |
| 120 | bool getCapture() const; |
| 121 | |
| 122 | :[JavaScript]: |
| 123 | |
| 124 | .. code-block:: javascript |
| 125 | |
| 126 | ForwardingFlags.prototype.getCapture = function() |
| 127 | |
| 128 | :Returns: |
| 129 | |
| 130 | true if the flag is set, false if it is cleared. |
| 131 | |
| 132 | ForwardingFlags.getLocal Method |
| 133 | ------------------------------- |
| 134 | |
| 135 | Get the value of the "local" flag. |
| 136 | |
| 137 | :[C++]: |
| 138 | |
| 139 | .. code-block:: c++ |
| 140 | |
| 141 | bool getLocal() const; |
| 142 | |
| 143 | :[JavaScript]: |
| 144 | |
| 145 | .. code-block:: javascript |
| 146 | |
| 147 | ForwardingFlags.prototype.getLocal = function() |
| 148 | |
| 149 | :Returns: |
| 150 | |
| 151 | true if the flag is set, false if it is cleared. |
| 152 | |
| 153 | ForwardingFlags.getTap Method |
| 154 | ----------------------------- |
| 155 | |
| 156 | Get the value of the "tap" flag. |
| 157 | |
| 158 | :[C++]: |
| 159 | |
| 160 | .. code-block:: c++ |
| 161 | |
| 162 | bool getTap() const; |
| 163 | |
| 164 | :[JavaScript]: |
| 165 | |
| 166 | .. code-block:: javascript |
| 167 | |
| 168 | ForwardingFlags.prototype.getTap = function() |
| 169 | |
| 170 | :Returns: |
| 171 | |
| 172 | true if the flag is set, false if it is cleared. |
| 173 | |
| 174 | ForwardingFlags.getCaptureOk Method |
| 175 | ----------------------------------- |
| 176 | |
| 177 | Get the value of the "captureOk" flag. |
| 178 | |
| 179 | :[C++]: |
| 180 | |
| 181 | .. code-block:: c++ |
| 182 | |
| 183 | bool getCaptureOk() const; |
| 184 | |
| 185 | :[JavaScript]: |
| 186 | |
| 187 | .. code-block:: javascript |
| 188 | |
| 189 | ForwardingFlags.prototype.getCaptureOk = function() |
| 190 | |
| 191 | :Returns: |
| 192 | |
| 193 | true if the flag is set, false if it is cleared. |
| 194 | |
| 195 | ForwardingFlags.setActive Method |
| 196 | -------------------------------- |
| 197 | |
| 198 | Set the value of the "active" flag |
| 199 | |
| 200 | :[C++]: |
| 201 | |
| 202 | .. code-block:: c++ |
| 203 | |
| 204 | void setActive( |
| 205 | |
| 206 | bool active; |
| 207 | |
| 208 | ); |
| 209 | |
| 210 | :[JavaScript]: |
| 211 | |
| 212 | .. code-block:: javascript |
| 213 | |
| 214 | ForwardingFlags.prototype.setActive = function( |
| 215 | |
| 216 | active // boolean |
| 217 | |
| 218 | ) |
| 219 | |
| 220 | :Parameters: |
| 221 | |
| 222 | - `active` |
| 223 | true to set the flag, false to clear it. |
| 224 | |
| 225 | ForwardingFlags.setChildInherit Method |
| 226 | -------------------------------------- |
| 227 | |
| 228 | Set the value of the "childInherit" flag |
| 229 | |
| 230 | :[C++]: |
| 231 | |
| 232 | .. code-block:: c++ |
| 233 | |
| 234 | void setChildInherit( |
| 235 | |
| 236 | bool childInherit; |
| 237 | |
| 238 | ); |
| 239 | |
| 240 | :[JavaScript]: |
| 241 | |
| 242 | .. code-block:: javascript |
| 243 | |
| 244 | ForwardingFlags.prototype.setChildInherit = function( |
| 245 | |
| 246 | childInherit // boolean |
| 247 | |
| 248 | ) |
| 249 | |
| 250 | :Parameters: |
| 251 | |
| 252 | - `childInherit` |
| 253 | true to set the flag, false to clear it. |
| 254 | |
| 255 | ForwardingFlags.setAdvertise Method |
| 256 | ----------------------------------- |
| 257 | |
| 258 | Set the value of the "advertise" flag |
| 259 | |
| 260 | :[C++]: |
| 261 | |
| 262 | .. code-block:: c++ |
| 263 | |
| 264 | void setAdvertise( |
| 265 | |
| 266 | bool advertise; |
| 267 | |
| 268 | ); |
| 269 | |
| 270 | :[JavaScript]: |
| 271 | |
| 272 | .. code-block:: javascript |
| 273 | |
| 274 | ForwardingFlags.prototype.setAdvertise = function( |
| 275 | |
| 276 | advertise // boolean |
| 277 | |
| 278 | ) |
| 279 | |
| 280 | :Parameters: |
| 281 | |
| 282 | - `advertise` |
| 283 | true to set the flag, false to clear it. |
| 284 | |
| 285 | ForwardingFlags.setLast Method |
| 286 | ------------------------------ |
| 287 | |
| 288 | Set the value of the "last" flag |
| 289 | |
| 290 | :[C++]: |
| 291 | |
| 292 | .. code-block:: c++ |
| 293 | |
| 294 | void setLast( |
| 295 | |
| 296 | bool last; |
| 297 | |
| 298 | ); |
| 299 | |
| 300 | :[JavaScript]: |
| 301 | |
| 302 | .. code-block:: javascript |
| 303 | |
| 304 | ForwardingFlags.prototype.setLast = function( |
| 305 | |
| 306 | last // boolean |
| 307 | |
| 308 | ) |
| 309 | |
| 310 | :Parameters: |
| 311 | |
| 312 | - `last` |
| 313 | true to set the flag, false to clear it. |
| 314 | |
| 315 | ForwardingFlags.setCapture Method |
| 316 | --------------------------------- |
| 317 | |
| 318 | Set the value of the "capture" flag |
| 319 | |
| 320 | :[C++]: |
| 321 | |
| 322 | .. code-block:: c++ |
| 323 | |
| 324 | void setCapture( |
| 325 | |
| 326 | bool capture; |
| 327 | |
| 328 | ); |
| 329 | |
| 330 | :[JavaScript]: |
| 331 | |
| 332 | .. code-block:: javascript |
| 333 | |
| 334 | ForwardingFlags.prototype.setCapture = function( |
| 335 | |
| 336 | capture // boolean |
| 337 | |
| 338 | ) |
| 339 | |
| 340 | :Parameters: |
| 341 | |
| 342 | - `capture` |
| 343 | true to set the flag, false to clear it. |
| 344 | |
| 345 | ForwardingFlags.setLocal Method |
| 346 | ------------------------------- |
| 347 | |
| 348 | Set the value of the "local" flag |
| 349 | |
| 350 | :[C++]: |
| 351 | |
| 352 | .. code-block:: c++ |
| 353 | |
| 354 | void setLocal( |
| 355 | |
| 356 | bool local; |
| 357 | |
| 358 | ); |
| 359 | |
| 360 | :[JavaScript]: |
| 361 | |
| 362 | .. code-block:: javascript |
| 363 | |
| 364 | ForwardingFlags.prototype.setLocal = function( |
| 365 | |
| 366 | local // boolean |
| 367 | |
| 368 | ) |
| 369 | |
| 370 | :Parameters: |
| 371 | |
| 372 | - `local` |
| 373 | true to set the flag, false to clear it. |
| 374 | |
| 375 | ForwardingFlags.setTap Method |
| 376 | ----------------------------- |
| 377 | |
| 378 | Set the value of the "tap" flag |
| 379 | |
| 380 | :[C++]: |
| 381 | |
| 382 | .. code-block:: c++ |
| 383 | |
| 384 | void setTap( |
| 385 | |
| 386 | bool tap; |
| 387 | |
| 388 | ); |
| 389 | |
| 390 | :[JavaScript]: |
| 391 | |
| 392 | .. code-block:: javascript |
| 393 | |
| 394 | ForwardingFlags.prototype.setTap = function( |
| 395 | |
| 396 | tap // boolean |
| 397 | |
| 398 | ) |
| 399 | |
| 400 | :Parameters: |
| 401 | |
| 402 | - `tap` |
| 403 | true to set the flag, false to clear it. |
| 404 | |
| 405 | ForwardingFlags.setCaptureOk Method |
| 406 | ----------------------------------- |
| 407 | |
| 408 | Set the value of the "captureOk" flag |
| 409 | |
| 410 | :[C++]: |
| 411 | |
| 412 | .. code-block:: c++ |
| 413 | |
| 414 | void setCaptureOk( |
| 415 | |
| 416 | bool captureOk; |
| 417 | |
| 418 | ); |
| 419 | |
| 420 | :[JavaScript]: |
| 421 | |
| 422 | .. code-block:: javascript |
| 423 | |
| 424 | ForwardingFlags.prototype.setCaptureOk = function( |
| 425 | |
| 426 | captureOk // boolean |
| 427 | |
| 428 | ) |
| 429 | |
| 430 | :Parameters: |
| 431 | |
| 432 | - `captureOk` |
| 433 | true to set the flag, false to clear it. |