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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.6/] [tools/] [src/] [librtcltools/] [RtclGet.ipp] - Diff between revs 19 and 24

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 19 Rev 24
// $Id: RtclGet.ipp 488 2013-02-16 18:49:47Z mueller $
// $Id: RtclGet.ipp 488 2013-02-16 18:49:47Z mueller $
//
//
// Copyright 2013- by Walter F.J. Mueller 
// Copyright 2013- by Walter F.J. Mueller 
//
//
// This program is free software; you may redistribute and/or modify it under
// This program is free software; you may redistribute and/or modify it under
// the terms of the GNU General Public License as published by the Free
// the terms of the GNU General Public License as published by the Free
// Software Foundation, either version 2, or at your option any later version.
// Software Foundation, either version 2, or at your option any later version.
//
//
// This program is distributed in the hope that it will be useful, but
// This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
// WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
// or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
// or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
// for complete details.
// for complete details.
//
//
// Revision History:
// Revision History:
// Date         Rev Version  Comment
// Date         Rev Version  Comment
// 2013-02-12   487   1.0    Initial version
// 2013-02-12   487   1.0    Initial version
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
/*!
/*!
  \file
  \file
  \version $Id: RtclGet.ipp 488 2013-02-16 18:49:47Z mueller $
  \version $Id: RtclGet.ipp 488 2013-02-16 18:49:47Z mueller $
  \brief   Implemenation (inline) of class RtclGet.
  \brief   Implemenation (inline) of class RtclGet.
*/
*/
/*!
/*!
  \class Retro::RtclGet
  \class Retro::RtclGet
  \brief FIXME_docs
  \brief FIXME_docs
*/
*/
// all method definitions in namespace Retro
// all method definitions in namespace Retro
namespace Retro {
namespace Retro {
//------------------------------------------+-----------------------------------
//------------------------------------------+-----------------------------------
//! FIXME_docs
//! FIXME_docs
template 
template 
inline RtclGet::RtclGet(const boost::function& get)
inline RtclGet::RtclGet(const boost::function& get)
  : fGet(get)
  : fGet(get)
{}
{}
//------------------------------------------+-----------------------------------
//------------------------------------------+-----------------------------------
//! FIXME_docs
//! FIXME_docs
template 
template 
inline RtclGet::~RtclGet()
inline RtclGet::~RtclGet()
{}
{}
//------------------------------------------+-----------------------------------
//------------------------------------------+-----------------------------------
//! FIXME_docs
//! FIXME_docs
template <>
template <>
inline Tcl_Obj* RtclGet::operator()() const
inline Tcl_Obj* RtclGet::operator()() const
{
{
  bool val = fGet();
  bool val = fGet();
  return Tcl_NewBooleanObj((int)val);
  return Tcl_NewBooleanObj((int)val);
}
}
//------------------------------------------+-----------------------------------
//------------------------------------------+-----------------------------------
//! FIXME_docs
//! FIXME_docs
template <>
template <>
inline Tcl_Obj* RtclGet::operator()() const
inline Tcl_Obj* RtclGet::operator()() const
{
{
  char val = fGet();
  char val = fGet();
  return Tcl_NewIntObj((int)val);
  return Tcl_NewIntObj((int)val);
}
}
//------------------------------------------+-----------------------------------
//------------------------------------------+-----------------------------------
//! FIXME_docs
//! FIXME_docs
template <>
template <>
inline Tcl_Obj* RtclGet::operator()() const
inline Tcl_Obj* RtclGet::operator()() const
{
{
  signed char val = fGet();
  signed char val = fGet();
  return Tcl_NewIntObj((int)val);
  return Tcl_NewIntObj((int)val);
}
}
//------------------------------------------+-----------------------------------
//------------------------------------------+-----------------------------------
//! FIXME_docs
//! FIXME_docs
template <>
template <>
inline Tcl_Obj* RtclGet::operator()() const
inline Tcl_Obj* RtclGet::operator()() const
{
{
  unsigned char val = fGet();
  unsigned char val = fGet();
  return Tcl_NewIntObj((int)val);
  return Tcl_NewIntObj((int)val);
}
}
//------------------------------------------+-----------------------------------
//------------------------------------------+-----------------------------------
//! FIXME_docs
//! FIXME_docs
template <>
template <>
inline Tcl_Obj* RtclGet::operator()() const
inline Tcl_Obj* RtclGet::operator()() const
{
{
  short val = fGet();
  short val = fGet();
  return Tcl_NewIntObj((int)val);
  return Tcl_NewIntObj((int)val);
}
}
//------------------------------------------+-----------------------------------
//------------------------------------------+-----------------------------------
//! FIXME_docs
//! FIXME_docs
template <>
template <>
inline Tcl_Obj* RtclGet::operator()() const
inline Tcl_Obj* RtclGet::operator()() const
{
{
  unsigned short val = fGet();
  unsigned short val = fGet();
  return Tcl_NewIntObj((int)val);
  return Tcl_NewIntObj((int)val);
}
}
//------------------------------------------+-----------------------------------
//------------------------------------------+-----------------------------------
//! FIXME_docs
//! FIXME_docs
template <>
template <>
inline Tcl_Obj* RtclGet::operator()() const
inline Tcl_Obj* RtclGet::operator()() const
{
{
  int val = fGet();
  int val = fGet();
  return Tcl_NewIntObj(val);
  return Tcl_NewIntObj(val);
}
}
//------------------------------------------+-----------------------------------
//------------------------------------------+-----------------------------------
//! FIXME_docs
//! FIXME_docs
template <>
template <>
inline Tcl_Obj* RtclGet::operator()() const
inline Tcl_Obj* RtclGet::operator()() const
{
{
  unsigned int val = fGet();
  unsigned int val = fGet();
  return Tcl_NewIntObj((int)val);
  return Tcl_NewIntObj((int)val);
}
}
//------------------------------------------+-----------------------------------
//------------------------------------------+-----------------------------------
//! FIXME_docs
//! FIXME_docs
template <>
template <>
inline Tcl_Obj* RtclGet::operator()() const
inline Tcl_Obj* RtclGet::operator()() const
{
{
  long val = fGet();
  long val = fGet();
  return Tcl_NewLongObj(val);
  return Tcl_NewLongObj(val);
}
}
//------------------------------------------+-----------------------------------
//------------------------------------------+-----------------------------------
//! FIXME_docs
//! FIXME_docs
template <>
template <>
inline Tcl_Obj* RtclGet::operator()() const
inline Tcl_Obj* RtclGet::operator()() const
{
{
  unsigned long val = fGet();
  unsigned long val = fGet();
  return Tcl_NewLongObj((long)val);
  return Tcl_NewLongObj((long)val);
}
}
//------------------------------------------+-----------------------------------
//------------------------------------------+-----------------------------------
//! FIXME_docs
//! FIXME_docs
template <>
template <>
inline Tcl_Obj* RtclGet::operator()() const
inline Tcl_Obj* RtclGet::operator()() const
{
{
  float val = fGet();
  float val = fGet();
  return Tcl_NewDoubleObj(val);
  return Tcl_NewDoubleObj(val);
}
}
//------------------------------------------+-----------------------------------
//------------------------------------------+-----------------------------------
//! FIXME_docs
//! FIXME_docs
template <>
template <>
inline Tcl_Obj* RtclGet::operator()() const
inline Tcl_Obj* RtclGet::operator()() const
{
{
  double val = fGet();
  double val = fGet();
  return Tcl_NewDoubleObj(val);
  return Tcl_NewDoubleObj(val);
}
}
//------------------------------------------+-----------------------------------
//------------------------------------------+-----------------------------------
//! FIXME_docs
//! FIXME_docs
template <>
template <>
inline Tcl_Obj* RtclGet::operator()() const
inline Tcl_Obj* RtclGet::operator()() const
{
{
  std::string val = fGet();
  std::string val = fGet();
  return Tcl_NewStringObj((char*) val.data(), val.length());
  return Tcl_NewStringObj((char*) val.data(), val.length());
}
}
//------------------------------------------+-----------------------------------
//------------------------------------------+-----------------------------------
//! FIXME_docs
//! FIXME_docs
template <>
template <>
inline Tcl_Obj* RtclGet::operator()() const
inline Tcl_Obj* RtclGet::operator()() const
{
{
  std::string val = fGet();
  std::string val = fGet();
  return Tcl_NewStringObj((char*) val.data(), val.length());
  return Tcl_NewStringObj((char*) val.data(), val.length());
}
}
} // end namespace Retro
} // end namespace Retro
 
 

powered by: WebSVN 2.1.0

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