Revision a519eb13 include/PoolObjectSQL.h

View differences:

include/PoolObjectSQL.h
307 307
     *    @param name of the attribute
308 308
     *    @param value of the attribute (an int), will be 0 if not defined or
309 309
     *    not a single attribute
310
     *
311
     *    @return True if the Single attribute was found and is a valid integer
312
     *    value
310 313
     */
311
    void get_template_attribute(
314
    bool get_template_attribute(
312 315
        const char *    name,
313 316
        int&            value) const
314 317
    {
315
        obj_template->get(name,value);
318
        return obj_template->get(name,value);
319
    }
320

  
321
    /**
322
     *  Gets a float based attribute (single)
323
     *    @param name of the attribute
324
     *    @param value of the attribute (a float), will be 0 if not defined or
325
     *    not a single attribute
326
     *
327
     *    @return True if the Single attribute was found and is a valid float
328
     *    value
329
     */
330
    bool get_template_attribute(
331
        const char *    name,
332
        float&          value) const
333
    {
334
        return obj_template->get(name,value);
316 335
    }
317 336

  
318 337
    /**
......
330 349
    }
331 350

  
332 351
    /**
352
     *  Adds a new attribute to the template (replacing it if
353
     *  already defined), the object's mutex SHOULD be locked
354
     *    @param name of the new attribute
355
     *    @param value of the new attribute
356
     *    @return 0 on success
357
     */
358
    int replace_template_attribute(
359
        const string& name,
360
        const int&    value)
361
    {
362
        ostringstream oss;
363
        oss << value;
364

  
365
        return replace_template_attribute(name, oss.str());
366
    }
367

  
368
    /**
333 369
     *  Generates a XML string for the template of the Object
334 370
     *    @param xml the string to store the XML description.
335 371
     */

Also available in: Unified diff