OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [gdb-5.0/] [gdb/] [testsuite/] [gdb.hp/] [gdb.objdbg/] [objdbg04/] [x.h] - Rev 1765

Compare with Previous | Blame | View Log

template <class T>
class Adder {
public:
  void set(T);
  T get();
  T add(T);
 
private:
  T val;
};
 
template <class T>
void Adder<T>::set(T new_val)
{
  val = new_val;
}
 
template <class T>
T Adder<T>::get()
{
  return val;
}
 
template <class T>
T Adder<T>::add(T new_val)
{
  val += new_val;
  return val;
}
 
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.