Esempio n. 1
0
bool pgsRecord::lines_equal(const pgsVectorRecordLine &lhs,
                            const pgsVectorRecordLine &rhs, bool case_sensitive) const
{
	pgsVarMap vars;

	// Both lines must have the same number of columns
	if (lhs.GetCount() != rhs.GetCount())
	{
		return false;
	}

	// Test each element (column) of the line
	for (USHORT j = 0; j < wx_static_cast(USHORT, lhs.GetCount()); j++)
	{
		// Test if the two elements are equal
		pgsEqual test(lhs[j]->string().clone(), rhs[j]->string().clone(),
		              case_sensitive);
		if (test.eval(vars)->value() == wxT("1"))
		{
			// lhs == rhs: continue
			continue;
		}
		else
		{
			// lhs != rhs: lines are not equal
			return false;
		}
	}

	return true;
}
Esempio n. 2
0
static inline void wxFromSystemTime( wxDateTime *dt, const SYSTEMTIME& st)
{
    dt->Set( st.wDay,
            wx_static_cast( wxDateTime::Month, wxDateTime::Jan + st.wMonth - 1),
            st.wYear,
            st.wHour,st.wMinute,st.wSecond);
}