Line 1... |
Line 1... |
// $Id: RtclArgs.ipp 373 2011-03-26 08:54:27Z mueller $
|
// $Id: RtclArgs.ipp 495 2013-03-06 17:13:48Z mueller $
|
//
|
//
|
// Copyright 2011- by Walter F.J. Mueller
|
// Copyright 2011-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.
|
//
|
//
|
Line 11... |
Line 11... |
// 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-03-05 495 1.0.8 add SetResult(bool)
|
|
// 2013-03-02 494 1.0.7 add Quit() method
|
|
// 2013-02-01 479 1.0.5 add Objv() method
|
// 2011-03-26 373 1.0.2 add SetResult(string)
|
// 2011-03-26 373 1.0.2 add SetResult(string)
|
// 2011-03-05 366 1.0.1 add NDone(), NOptMiss(), SetResult();
|
// 2011-03-05 366 1.0.1 add NDone(), NOptMiss(), SetResult();
|
// 2011-02-26 364 1.0 Initial version
|
// 2011-02-26 364 1.0 Initial version
|
// 2011-02-18 362 0.1 First draft
|
// 2011-02-18 362 0.1 First draft
|
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
|
|
/*!
|
/*!
|
\file
|
\file
|
\version $Id: RtclArgs.ipp 373 2011-03-26 08:54:27Z mueller $
|
\version $Id: RtclArgs.ipp 495 2013-03-06 17:13:48Z mueller $
|
\brief Implemenation (inline) of RtclArgs.
|
\brief Implemenation (inline) of RtclArgs.
|
*/
|
*/
|
|
|
#include "Rtcl.hpp"
|
#include "Rtcl.hpp"
|
|
|
// all method definitions in namespace Retro (avoid using in includes...)
|
// all method definitions in namespace Retro
|
namespace Retro {
|
namespace Retro {
|
|
|
//------------------------------------------+-----------------------------------
|
//------------------------------------------+-----------------------------------
|
//! FIXME_docs
|
//! FIXME_docs
|
|
|
Line 47... |
Line 50... |
}
|
}
|
|
|
//------------------------------------------+-----------------------------------
|
//------------------------------------------+-----------------------------------
|
//! FIXME_docs
|
//! FIXME_docs
|
|
|
|
inline Tcl_Obj* const * RtclArgs::Objv() const
|
|
{
|
|
return fObjv;
|
|
}
|
|
|
|
//------------------------------------------+-----------------------------------
|
|
//! FIXME_docs
|
|
|
inline bool RtclArgs::OptValid() const
|
inline bool RtclArgs::OptValid() const
|
{
|
{
|
return !fOptErr;
|
return !fOptErr;
|
}
|
}
|
|
|
Line 89... |
Line 100... |
}
|
}
|
|
|
//------------------------------------------+-----------------------------------
|
//------------------------------------------+-----------------------------------
|
//! FIXME_docs
|
//! FIXME_docs
|
|
|
|
inline void RtclArgs::SetResult(bool val)
|
|
{
|
|
Tcl_SetObjResult(fpInterp, Tcl_NewBooleanObj(val));
|
|
return;
|
|
}
|
|
|
|
//------------------------------------------+-----------------------------------
|
|
//! FIXME_docs
|
|
|
inline void RtclArgs::SetResult(int val)
|
inline void RtclArgs::SetResult(int val)
|
{
|
{
|
Tcl_SetObjResult(fpInterp, Tcl_NewIntObj(val));
|
Tcl_SetObjResult(fpInterp, Tcl_NewIntObj(val));
|
return;
|
return;
|
}
|
}
|
Line 143... |
Line 163... |
}
|
}
|
|
|
//------------------------------------------+-----------------------------------
|
//------------------------------------------+-----------------------------------
|
//! FIXME_docs
|
//! FIXME_docs
|
|
|
|
inline int RtclArgs::Quit(const std::string& str)
|
|
{
|
|
Tcl_AppendResult(fpInterp, str.c_str(), NULL);
|
|
return TCL_ERROR;
|
|
}
|
|
|
|
//------------------------------------------+-----------------------------------
|
|
//! FIXME_docs
|
|
|
inline Tcl_Obj* RtclArgs::operator[](size_t ind) const
|
inline Tcl_Obj* RtclArgs::operator[](size_t ind) const
|
{
|
{
|
return fObjv[ind];
|
return fObjv[ind];
|
}
|
}
|
|
|