~ubuntu-branches/ubuntu/utopic/nordugrid-arc/utopic-proposed

« back to all changes in this revision

Viewing changes to src/hed/libs/compute/GLUE2Entity.h

  • Committer: Package Import Robot
  • Author(s): Mattias Ellert
  • Date: 2013-04-17 06:37:28 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20130417063728-h56uqu0belk87zqa
Tags: 3.0.0-1
3.0.0 Release (Closes: #690716)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// -*- indent-tabs-mode: nil -*-
 
2
 
 
3
#ifndef __ARC_GLUE2ENTITY_H__
 
4
#define __ARC_GLUE2ENTITY_H__
 
5
 
 
6
/** \file
 
7
 * \brief template class for %GLUE2 entities.
 
8
 */
 
9
 
 
10
#include <arc/Utils.h>
 
11
 
 
12
namespace Arc {
 
13
 
 
14
  /**
 
15
   * \ingroup resourceinfo
 
16
   * \headerfile ExecutionTarget.h arc/compute/ExecutionTarget.h
 
17
   */
 
18
  template<typename T>
 
19
  class GLUE2Entity {
 
20
  public:
 
21
    GLUE2Entity() : Attributes(new T) {}
 
22
 
 
23
    T       * operator->()       { return &(*Attributes); }
 
24
    T const * operator->() const { return &(*Attributes); }
 
25
    T       & operator*()        { return *Attributes; }
 
26
    T const & operator*()  const { return *Attributes; }
 
27
 
 
28
    CountedPointer<T> Attributes;
 
29
  };
 
30
} // namespace Arc
 
31
 
 
32
#endif // __ARC_GLUE2ENTITY_H__