• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ FS函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中FS函数的典型用法代码示例。如果您正苦于以下问题:C++ FS函数的具体用法?C++ FS怎么用?C++ FS使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了FS函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: _T

void 
CConnectionManager::AsyncConnectThread()
{
	DWORD size = 1024;
	TCHAR host[1024] = _T("localhost");
	if (GetStringValueFromRegistry(REGISTRY_ROOT_KEY, REGISTRY_SETTINGS_KEY, REGISTRY_SETTINGS_HOST, host, &size)!=0)
	{
		m_Parent->Log(_T("Unable to read host record from registry."), ICON_WARNING);
	}

	DWORD port = 41258;
	if (GetDWORDValueFromRegistry(REGISTRY_ROOT_KEY, REGISTRY_SETTINGS_KEY, REGISTRY_SETTINGS_PORT, &port)!=0)
	{
		m_Parent->Log(_T("Unable to read port from registry."), ICON_WARNING);
	}

	CString sport;
	sport.Format(_T("%d"), port);
	if (!m_Connection.ConnectTo(host, sport, AF_INET, SOCK_STREAM))
	{
		BrowserManagerLock browserManager;
		CBrowserMessageWindow* window = browserManager->FindBrowserMessageWindow(m_Parent->GetBrowserId());
		if (!window) return;

		window->PostMessage(BMM_REQUEST_LOG, ICON_WARNING, (LPARAM)FS(_T("Unable to see XRefresh Monitor.")));
		window->PostMessage(BMM_REQUEST_LOG, ICON_BULB, (LPARAM)FS(_T("Please check if you have running XRefresh Monitor. On Windows, it is program running in system tray. Look for Programs -> XRefresh -> XRefresh.exe")));
		window->PostMessage(BMM_REQUEST_LOG, ICON_BULB, (LPARAM)FS(_T("You may also want to check your firewall settings. XRefresh IE Addon expects Monitor to talk from %s on port %d"), host, port));
		TRACE_I(_T("server not available"));
		return;
	}
	m_Connection.WatchComm();
	SendHello();
}
开发者ID:chzh,项目名称:xrefresh,代码行数:33,代码来源:ConnectionManager.cpp


示例2: DT

STDMETHODIMP 
CUpgradrToolbar::SetSite(IUnknown *pUnknownSite)
{
	DT(TRACE_I(FS(_T("Toolbar[%08X]: SetSite(%08X)"), this, pUnknownSite)));
	try {
		if (!!pUnknownSite)
		{
			// attach the window
			HWND hMyWindow;
			CComPtr<IUnknown> site(pUnknownSite);
			CComQIPtr<IOleWindow> window(site);
			window->GetWindow(&hMyWindow);
			if (!hMyWindow) 
			{
				TRACE_E(FS(_T("Toolbar[%08X]: Cannot retrieve toolbar base window"), this));
				return E_FAIL;
			}
			SubclassWindow(hMyWindow);

			// get a WebBrowser reference
			CComQIPtr<IServiceProvider> serviceProvider(site);
			serviceProvider->QueryService(IID_IWebBrowserApp, IID_IWebBrowser2, (void**)&m_spWebBrowser);
			site->QueryInterface(IID_IInputObjectSite, (void**)&m_spSite);

			// create main window
			CreateMainWindow();
		}
	}
	catch (CUpgradrRuntimeError &ex)
	{
		HandleError(ex.ErrorMessage());
		return E_FAIL;
	}
	return S_OK;
}
开发者ID:cherry-wb,项目名称:upgradr,代码行数:35,代码来源:UpgradrToolbar.cpp


示例3: error

void AGameObject::Attack( AGameObject* go )
{
  if( go == this ) {
    error( "Attacking self" );
    return;
  }
  Stop(); // DropTargets & Clear Old Waypoint queue

  if( AttackTarget )
  {
    info( FS( "%s unfollowed %s", *GetName(), *AttackTarget->GetName() ) );
  }

  AttackTarget = go;
  if( AttackTarget )
  {
    if( AttackTarget->Dead ) {
      error( FS( "Trying to attack dead target %s", *go->GetName() ) );
      AttackTarget = 0;
      return;
    }

    AttackTarget->Attackers += this;
    Game->flycam->MarkAsAttack( AttackTarget );
  }

  AttackReady = 0; // Do not stop to engage other units
}
开发者ID:superwills,项目名称:Wryv,代码行数:28,代码来源:GameObject.cpp


示例4: GetCurrentThreadId

bool											
CUpgradrRootImpl::CheckThreadOwnership(ESharedResourceId rid)
{
#ifdef _DEBUG
	DWORD tid = GetCurrentThreadId();
	m_MainCS.Enter();
	TOwnership::iterator i = m_Ownership.find(rid);
	if (i==m_Ownership.end())
	{
		TRACE_E(FS(_T("Resource %s owned by no thread used by thread %08X !!!"), g_acResourceNames[rid], tid));
		DebugBreak();
		m_MainCS.Leave();
		return false;
	}
	if (i->second.first!=tid)
	{
		TRACE_E(FS(_T("Resource %s owned by thread %08X used by thread %08X !!!"), g_acResourceNames[rid], i->second.first, tid));
		DebugBreak();
		m_MainCS.Leave();
		return false;
	}
	m_MainCS.Leave();
#endif
	return true;
}
开发者ID:cherry-wb,项目名称:upgradr,代码行数:25,代码来源:Module.cpp


示例5: warning

void AGameObject::OnHitContactBegin_Implementation( AActor* OtherActor,
  UPrimitiveComponent* OtherComp, int32 OtherBodyIndex,
  bool bFromSweep, const FHitResult & SweepResult )
{
  //info( FS( "OnHitContactBegin %s with %s", *Name, *OtherActor->GetName() ) );
  if( OtherActor == this )
  {
    // Don't do anything with reports of collision with self.
    return;
  }

  AGameObject* THAT = Cast<AGameObject>( OtherActor );
  if( THAT )
  {
    //info( FS( "HitContactBegin: %s : %s/%s", *GetName(), *OtherActor->GetName(), *OtherComp->GetName() ) );
    if( in( HitOverlaps, THAT ) )
    {
      warning( FS( "HitContactBegin: %s was already overlapped by %s/%s", *GetName(), *OtherActor->GetName(), *OtherComp->GetName() ) );
    }
    else
    {
      // Both were gameobjects
      Hit( THAT );
      HitOverlaps += THAT; // Retain collection of objects i'm overlapping with
    }
  }
  else
  {
    error( FS( "%s", *THAT->GetName() ) );
  }
}
开发者ID:superwills,项目名称:Wryv,代码行数:31,代码来源:GameObject.cpp


示例6: FS

void CMDIClient::OnSize(UINT nType, CSize size)
{
	if (FS()->TabItem())
	{
		FS()->TabItem()->GetChildFrame()->SetWindowPos(NULL, 0, 0, size.cx, size.cy, SWP_NOMOVE | SWP_NOZORDER);
		FS()->TabItem()->GetChildFrame()->PostMessage(WM_SIZE, 0, MAKELPARAM(size.cx, size.cy));
	}
}
开发者ID:Williamzuckerberg,项目名称:chtmoneyhub,代码行数:8,代码来源:MDIClient.cpp


示例7: fswrite

long
fswrite(Chan *c, void *va, long n, vlong offset)
{
	int r;

	osenter();
	r = pwrite(FS(c)->fd, va, n, offset);
	osleave();
	if(r < 0)
		fserr(FS(c));
	return r;
}
开发者ID:8l,项目名称:inferno,代码行数:12,代码来源:devfs.c


示例8: CheckWaypoint

void AGameObject::Walk( float t )
{
  CheckWaypoint();

  // Alter destination based on locations of other units.
  FVector ToDest = Dest - Pos;
  
  // Clamp travel length so that we can't overshoot destination
  if( float Len = ToDest.Size() )
  {
    Dir = ToDest / Len; // normalize
    if( !Stats.SpeedMax )  error( FS("%s had 0 speed", *GetName()) );
    
    // I am maxing out the speed here.
    Speed = Stats.SpeedMax;

    // The direction of travel is modified by repulsion forces
    FVector repulsionForces = GetRepulsionForcesFromOverlappedUnits();
    FVector modDir = Dir + repulsionForces;
    modDir.Normalize();
    FVector Vel = modDir*Speed;
    //Game->flycam->DrawDebug( Pos, Pos + Vel, 5.f, FLinearColor::Red, 0.f );
    FVector travel = Vel*t;

    // If travel exceeds destination, then jump to dest,
    // so we don't jitter over the final position.
    if( Len < travel.Size() )
    {
      // snap to position & stop moving.
      Pos = Dest; // we are @ destination.
      travel = ToDest; // This is the displacement we actually moved.
      Speed = 0;
    }
    else
    {
      Pos += travel;
      if( Grounds )
      {
        FVector newPos = Pos + UnitZ * 10.f;
        // Travel in direction plus some amount straight up.
        // The straight up amount ensures that the unit doesn't sink underground
        if( Game->flycam->SetOnGround( newPos ) )  Pos = newPos;
        else  error( FS( "%s Object was trying to leave the ground plane.", *GetName() ) );
      }
      SetRot( Dir.Rotation() );
    }
  }
  else
  {
    // We're at the destination, so the velocity becomes 0
    Speed = 0.f;
  }
}
开发者ID:superwills,项目名称:Wryv,代码行数:53,代码来源:GameObject.cpp


示例9: fsstat

int
fsstat(Chan *c, uchar *dp, int n)
{
	if(FS(c)->fd >= 0)
		n = fstat(FS(c)->fd, dp, n);
	else
		n = stat(FS(c)->name->s, dp, n);
	if(n < 0)
		fserr(FS(c));
	/* TO DO: change name to / if rootqid */
	return n;
}
开发者ID:8l,项目名称:inferno,代码行数:12,代码来源:devfs.c


示例10: fswstat

int
fswstat(Chan *c, uchar *dp, int n)
{
	osenter();
	if(FS(c)->fd >= 0)
		n = fwstat(FS(c)->fd, dp, n);
	else
		n = wstat(FS(c)->name->s, dp, n);
	osleave();
	if(n < 0)
		fserr(FS(c));
	return n;
}
开发者ID:8l,项目名称:inferno,代码行数:13,代码来源:devfs.c


示例11: DT

STDMETHODIMP 
CXRefreshToolbar::SetSite(IUnknown *pUnknownSite)
{
	DT(TRACE_I(FS(_T("Toolbar[%08X]: SetSite(%08X)"), this, pUnknownSite)));
	try {
		if (!!pUnknownSite)
		{
			// attach the window
			HWND hWnd;
			CComPtr<IUnknown> site(pUnknownSite);
			CComQIPtr<IOleWindow> window(site);
			window->GetWindow(&hWnd);
			if (!hWnd) 
			{
				TRACE_E(FS(_T("Toolbar[%08X]: Cannot retrieve toolbar base window"), this));
				return E_FAIL;
			}
			SubclassWindow(hWnd);

			// get a WebBrowser reference
			CComQIPtr<IServiceProvider> serviceProvider(site);
			serviceProvider->QueryService(IID_IWebBrowserApp, IID_IWebBrowser2, (void**)&m_Browser);
			site->QueryInterface(IID_IInputObjectSite, (void**)&m_Site);

			// retrive browser id
			{
				BrowserManagerLock browserManager;
				m_BrowserId = browserManager->AllocBrowserId(m_Browser, this);
				ATLASSERT(m_BrowserId!=NULL_BROWSER);
			}

			// create main window
			CreateMainWindow();
		}
		else
		{
			BrowserManagerLock browserManager;
			CBrowserMessageWindow* bw = browserManager->FindBrowserMessageWindow(m_BrowserId);
			ATLASSERT(bw);
			bw->SetToolbar(NULL);
			browserManager->ReleaseBrowserId(m_BrowserId);
			m_BrowserId = NULL_BROWSER;
		}
	}
	catch (CXRefreshRuntimeError &ex)
	{
		HandleError(ex.ErrorMessage());
		return E_FAIL;
	}
	return S_OK;
}
开发者ID:chzh,项目名称:xrefresh,代码行数:51,代码来源:XRefreshToolbar.cpp


示例12: fsopen

Chan*
fsopen(Chan *c, int mode)
{
	osenter();
	FS(c)->fd = open(FS(c)->name->s, mode);
	osleave();
	if(FS(c)->fd < 0)
		fserr(FS(c));
	c->mode = openmode(mode);
	c->offset = 0;
	FS(c)->offset = 0;
	c->flag |= COPEN;
	return c;
}
开发者ID:8l,项目名称:inferno,代码行数:14,代码来源:devfs.c


示例13: PExprTestLaunch

void PExprTestLaunch()
{
	char* sourceTest = "sourceTest.txt";
	ifstream FS(sourceTest);
	string FN;
	while (true)
	{
		if (FS.eof())
			break;
		getline(FS, FN);
		try
		{
			Parser P(FN.c_str());
			P.ParserExprTEST();
			P.PrintExprTree(FN.substr(0, FN.length() - 3) + "out", true);
			//printf("%lf\n", P.CalcTree());
		}
		catch (exception a)
		{
			printf_s("\n%s\n\n", a.what());
			continue;
		}
	}
	return;
}
开发者ID:aleksey-bk,项目名称:Pascal_Compiler,代码行数:25,代码来源:main.cpp


示例14: init_sequences

// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// init_sequences
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
void init_sequences()
{

	extern Sequence_Wrapper g_sequences;

	// Local Variables
	SystemParameters    sysParams;
    char filename[100];

    gdk_threads_enter();    // Get GDK lock
    int     Br = BITRATE();
    int     Bs = BLOCKSIZE();
    char*   Fn = SEQFILENAME();
    int     Fs = FS();
    gdk_threads_leave();    // Release GDK lock

    // Set up system parameters
    sysParams.setSamplingRate(Fs);
    sysParams.setBlockSize(Bs);
	sysParams.setBitRate(Br);


	// Set up the sequences!
    g_snprintf(filename,100,"../res/%s",Fn);
	g_sequences.setSystemParameters(&sysParams);
	g_sequences.load_sequences_from_file(filename);
	g_sequences.print_sequences();

}
开发者ID:hamiltonkibbe,项目名称:Capstone-BCI-Flight-Simulator,代码行数:32,代码来源:Sequence_Wrapper_Interface.cpp


示例15: CheckExtraTree

	bool CheckExtraTree(FULogFile& fileOut, FCDExtra* extra, bool hasTypes)
	{
		FailIf(extra == NULL);

		// Find and verify the one technique
		FailIf(extra->GetDefaultType()->GetTechniqueCount() < 1); // note that FCDLight adds some <extra> elements of its own.
		FCDETechnique* technique = extra->GetDefaultType()->FindTechnique("FCTEI_TestProfile");
		FailIf(technique == NULL);

		// Find and verify the base parameter tree node
		FailIf(technique->GetChildNodeCount() != 1);
		FCDENode* baseNode = technique->GetChildNode(0);
		PassIf(baseNode != NULL);
		PassIf(extra->GetDefaultType()->FindRootNode("MainParameterTree") == baseNode);

		// Verify the base node attributes
		PassIf(baseNode->GetAttributeCount() == 2);
		FCDEAttribute* a1 = baseNode->FindAttribute("Vicious");
		FCDEAttribute* a2 = baseNode->FindAttribute("Gross");
		FailIf(a1 == NULL);
		FailIf(a2 == NULL);
		FailIf(a1 == a2);
		PassIf(IsEquivalent(a1->GetValue(), FC("Squirrel")));
		PassIf(IsEquivalent(FUStringConversion::ToUInt32(a2->GetValue()), (uint32)1002));

		// Identify the base node leaves
		PassIf(baseNode->GetChildNodeCount() == 2);
		FCDENode* leaf0 = NULL,* leaf3 = NULL;
		for (size_t i = 0; i < 2; ++i)
		{
			FCDENode* leaf = baseNode->GetChildNode(i);
			PassIf(IsEquivalent(leaf->GetName(), "SomeParameter"));
			FCDEAttribute* guts = leaf->FindAttribute("Guts");
			FailIf(guts == NULL || guts->GetValue().empty());
			uint32 gutsIndex = FUStringConversion::ToUInt32(guts->GetValue());
			if (gutsIndex == 0) { FailIf(leaf0 != NULL); leaf0 = leaf; }
			else if (gutsIndex == 3) { FailIf(leaf3 != NULL); leaf3 = leaf; }
			else Fail;
		}
		FailIf(leaf0 == NULL || leaf3 == NULL);

		// Verify the base node leaves
		PassIf(leaf0->GetChildNodeCount() == 0);
		PassIf(leaf3->GetChildNodeCount() == 0);
		PassIf(leaf0->GetAttributeCount() == 1);
		PassIf(leaf3->GetAttributeCount() == 1);
		PassIf(IsEquivalent(leaf0->GetContent(), FC("Test_SomeParameter")));
		PassIf(IsEquivalent(leaf3->GetContent(), FS("Test_ThatParameter!")));

		if (hasTypes)
		{
			// Verify the second extra type
			// Empty named-types should be imported without complaints or merging.
			FCDEType* secondType = extra->FindType("verificator");
			PassIf(secondType != NULL);
			PassIf(secondType != extra->GetDefaultType());
			PassIf(secondType->GetTechniqueCount() == 0);
		}
		return true;
	}
开发者ID:BSVino,项目名称:fcolladaCE,代码行数:60,代码来源:FCTEIExtra.cpp


示例16: Sleep

STDMETHODIMP 
CUpgradrScriptDebugger::OnDebugOutput(LPCOLESTR pstr)
{
	Sleep(0);
	DT(TRACE_W(FS(_T("CUpgradrScriptDebugger::OnDebugOutput(%S)"), pstr)));
	return S_OK;
}
开发者ID:cherry-wb,项目名称:upgradr,代码行数:7,代码来源:UpgradrScriptDebugger.cpp


示例17: XOJ_CHECK_TYPE

void ToolPageLayer::setLayerCount(int layer, int selected)
{
	XOJ_CHECK_TYPE(ToolPageLayer);

	this->inCbUpdate = true;

	int count = gtk_tree_model_iter_n_children(gtk_combo_box_get_model(GTK_COMBO_BOX(this->layerComboBox)), NULL);

	for (int i = count - 1; i >= 0; i--)
	{
		gtk_combo_box_remove_text(GTK_COMBO_BOX(this->layerComboBox), i);
	}

	gtk_combo_box_append_text(GTK_COMBO_BOX(this->layerComboBox), _C("Background"));
	for (int i = 1; i <= layer; i++)
	{
		string text = FS(_F("Layer {1}") % i);
		gtk_combo_box_prepend_text(GTK_COMBO_BOX(this->layerComboBox), text.c_str());
	}

	setSelectedLayer(selected);

	this->layerCount = layer;
	this->inCbUpdate = false;
}
开发者ID:project-renard-survey,项目名称:xournalpp,代码行数:25,代码来源:ToolPageLayer.cpp


示例18: sizeof

void CAddrDropDownList::OnLButtonUp(UINT nFlags, CPoint point)
{
	SCROLLINFO si = { sizeof(SCROLLINFO), SIF_POS };
	GetScrollInfo(SB_VERT, &si);

	int iDelta = s()->Combo()->GetComboDropdownItemBackgroundHeight(m_bBigDropDown);
	int iSelection = (point.y + si.nPos) / iDelta;

	RECT rcClient;
	GetClientRect(&rcClient);

	RECT rcItem = { 0, iSelection*iDelta,  rcClient.right, (iSelection + 1) * iDelta };
	CPoint pt = point;
	pt.y += si.nPos;

	// µãµ½XÉÏÁË
	if (Btn_MouseOver == GetDelButtonStatus(rcItem, pt))
	{
		RemoveDropDownSelection(iSelection);
	}
	else
	{
		FS()->AddrCombo()->StartNavigate(1 + m_LocalData[iSelection].iType, 0, m_LocalData[iSelection].strURL);
	}

}
开发者ID:Williamzuckerberg,项目名称:chtmoneyhub,代码行数:26,代码来源:AddrDropDownList.cpp


示例19: DTI

STDMETHODIMP
CXRefreshBHO::OnWindowStateChanged(DWORD dwFlags, DWORD dwValidFlagsMask)
{
	DTI(TRACE_LI(FS(_T("BHO[%08X]: OnWindowStateChanged()"), this)));
	m_IE7ToolWindow.SetParent(this);
	return S_OK;
}
开发者ID:JackTheHack,项目名称:xrefresh,代码行数:7,代码来源:XRefreshBHO.cpp


示例20: ATLASSERT

void CMDIClient::ClosePage(CTabItem *pItem)
{
	ATLASSERT(pItem);
	if (pItem->m_pCategory->GetWebData()->IsNoClose())
		return;

	if (m_TabCtrl.GetTabItems().size() == 1)
	{
		// 只剩一个,则关闭category
		CloseCategory(pItem->m_pCategory);
		return;
	}

	CTabItem *pNewItem = FS()->TabItem();
	if (pItem == pNewItem)
	{
		pNewItem = m_TabCtrl.GetLeftOrRight(pItem, true, false);
		ActivePage(pNewItem);
	}
	pItem->m_pCategory->m_TabItems.erase(pItem->m_pCategory->m_TabItems.begin() + pItem->GetIndex());
	pItem->m_pCategory->Redraw();
	m_TabCtrl.DeleteItem(pItem->GetIndex());
	bool isTrueClose = true;

	if(isIE6 && wcscmp(pItem->m_pCategory->GetWebData()->GetName() , L"支付宝") == 0)
			isTrueClose = false;
	if(isIE6 && pItem->m_pCategory->m_ShowInfo == L"支付宝")
			isTrueClose = false;

	pItem->GetChildFrame()->OptionalDestroy(0, isTrueClose);
}
开发者ID:Williamzuckerberg,项目名称:chtmoneyhub,代码行数:31,代码来源:MDIClient.cpp



注:本文中的FS函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ FSAL_CLEAR_MASK函数代码示例发布时间:2022-05-30
下一篇:
C++ FRotator函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap