示例#1
0
 ::HRESULT __stdcall IconOverlay::IsMemberOf (
     const wchar_t * path, ::DWORD attributes
     )
 try
 {
     return (accepts(
         w32::bstring(path), w32::fs::Attributes(attributes)
         )? S_OK : S_FALSE);
 }
 catch ( ... ) {
     return (E_FAIL);
 }
示例#2
0
bool
subsystem::add_component( component& comp )
{
  auto tid = comp.tid( );
  if ( !accepts( comp ) ) {
    return false;
  }

  reg_components[ tid ].push_back( &comp );
  ++not_sorted_map[ tid ];
  detail::sort_if_necessary( reg_components, not_sorted_map, tid, sorting_limit );

  after_addition( comp );
  return true;
}
示例#3
0
void SpellCatalog::queryChanged()
{
	int newStatus = 0;
	QString cmd = query();
	int origLength = cmd.length();

	if (cmd.isEmpty()) {
		reset();
		setBestMatch(Match());
	} else {
		if (accepts(cmd)) {
			_result.setText(cmd);

			setBestMatch(Match(&_result, _result.parseError() ? 10 : 100, origLength));
			//set status.
			//add S_Multiple to make sure katapult doesn't auto-exec and close the window
			//add S_Active to make sure katapult doesn't start the hideTimer or clearTimer
			newStatus = S_HasResults | S_Multiple | S_Active;
		} else {
			newStatus = 0;
		}
	}
	setStatus(newStatus);
}
示例#4
0
StackmapValue::StackmapValue(unsigned index, CheckedOpcodeTag, Opcode opcode, Type type, Origin origin)
    : Value(index, CheckedOpcode, opcode, type, origin)
{
    ASSERT(accepts(opcode));
}
示例#5
0
bool ZLXMLReader::BrokenNamePredicate::accepts(const ZLXMLReader &reader, const char *name) const {
	return accepts(reader, std::string(name));
}