예제 #1
0
파일: cpp_xloper.cpp 프로젝트: daveysj/sjd
//-------------------------------------------------------------------
// Change the type and assign the given value
//-------------------------------------------------------------------
cpp_xloper::operator int(void)
{
   int i;

   if(coerce_to_int(&m_Op, i))
      return i;

   return 0;
}
예제 #2
0
파일: cpp_xloper.cpp 프로젝트: daveysj/sjd
//-------------------------------------------------------------------
bool cpp_xloper::operator==(WORD e)
{
   int i;

   if(!coerce_to_int(&m_Op, i) || (WORD)i != e)
      return false;

   return true;
}
예제 #3
0
파일: cpp_xloper.cpp 프로젝트: daveysj/sjd
//-------------------------------------------------------------------
bool cpp_xloper::operator==(int w)
{
   int i;

   if(!coerce_to_int(&m_Op, i) || i != w)
      return false;

   return true;
}
예제 #4
0
파일: xloper.cpp 프로젝트: lemahdi/mglib
//-------------------------------------------------------------------
bool coerce_to_short(const xloper *p_op, short &s)
{
	int i;
	if(!coerce_to_int(p_op, i))
		return false;

	s = (short)i;
	return true;
}
예제 #5
0
파일: ZZp.cpp 프로젝트: ChristineJost/M2
bool Z_mod::lift(const Ring *Rg, const ring_elem f, ring_elem &result) const
{
  // Rg = Z ---> Z/p
  if (Rg == globalZZ)
    {
      result = Rg->from_int(coerce_to_int(f));
      return true;
    }
  return false;
}
예제 #6
0
파일: cpp_xloper.cpp 프로젝트: daveysj/sjd
//-------------------------------------------------------------------
bool cpp_xloper::GetArrayElement(DWORD offset, int &w)
{
   return coerce_to_int(GetArrayElement(offset), w);
}
예제 #7
0
파일: cpp_xloper.cpp 프로젝트: daveysj/sjd
//-------------------------------------------------------------------
bool cpp_xloper::GetArrayElement(WORD row, WORD column, int &w)
{
   return coerce_to_int(GetArrayElement(row, column), w);
}