コード例 #1
0
ファイル: IconOverlay.cpp プロジェクト: AndreLouisCaron/w32
 ::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
ファイル: subsystem.cpp プロジェクト: nikux/game_engine
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
ファイル: spellcatalog.cpp プロジェクト: iegor/kdesktop
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
ファイル: B3StackmapValue.cpp プロジェクト: zte-lhg/webkit
StackmapValue::StackmapValue(unsigned index, CheckedOpcodeTag, Opcode opcode, Type type, Origin origin)
    : Value(index, CheckedOpcode, opcode, type, origin)
{
    ASSERT(accepts(opcode));
}
コード例 #5
0
ファイル: ZLXMLReader.cpp プロジェクト: 2php/FBReaderJ
bool ZLXMLReader::BrokenNamePredicate::accepts(const ZLXMLReader &reader, const char *name) const {
	return accepts(reader, std::string(name));
}