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

C++ GetRoot函数代码示例

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

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



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

示例1: PROFILER_LABEL

bool
ClientLayerManager::EndTransactionInternal(DrawPaintedLayerCallback aCallback,
                                           void* aCallbackData,
                                           EndTransactionFlags)
{
  PROFILER_LABEL("ClientLayerManager", "EndTransactionInternal",
    js::ProfileEntry::Category::GRAPHICS);

#ifdef MOZ_LAYERS_HAVE_LOG
  MOZ_LAYERS_LOG(("  ----- (beginning paint)"));
  Log();
#endif
  profiler_tracing("Paint", "Rasterize", TRACING_INTERVAL_START);

  NS_ASSERTION(InConstruction(), "Should be in construction phase");
  mPhase = PHASE_DRAWING;

  ClientLayer* root = ClientLayer::ToClientLayer(GetRoot());

  mTransactionIncomplete = false;
      
  // Apply pending tree updates before recomputing effective
  // properties.
  GetRoot()->ApplyPendingUpdatesToSubtree();
    
  mPaintedLayerCallback = aCallback;
  mPaintedLayerCallbackData = aCallbackData;

  GetRoot()->ComputeEffectiveTransforms(Matrix4x4());

  root->RenderLayer();
  if (!mRepeatTransaction && !GetRoot()->GetInvalidRegion().IsEmpty()) {
    GetRoot()->Mutated();
  }

  if (!mIsRepeatTransaction) {
    mAnimationReadyTime = TimeStamp::Now();
    GetRoot()->StartPendingAnimations(mAnimationReadyTime);
  }

  mPaintedLayerCallback = nullptr;
  mPaintedLayerCallbackData = nullptr;

  // Go back to the construction phase if the transaction isn't complete.
  // Layout will update the layer tree and call EndTransaction().
  mPhase = mTransactionIncomplete ? PHASE_CONSTRUCTION : PHASE_NONE;

  NS_ASSERTION(!aCallback || !mTransactionIncomplete,
               "If callback is not null, transaction must be complete");

  if (gfxPlatform::GetPlatform()->DidRenderingDeviceReset()) {
    FrameLayerBuilder::InvalidateAllLayers(this);
  }

  return !mTransactionIncomplete;
}
开发者ID:Phoxygen,项目名称:gecko-dev,代码行数:56,代码来源:ClientLayerManager.cpp


示例2: locker

VOID* KBinaryTree::SearchData(VOID* data, ULONG dwCompareParam)
{
  KLocker locker(&m_KSynchroObject);
  KBinaryTreeNode* pNode = GetRoot();
  VOID*       pData = NULL;

  if (pNode != NULL)
  {  
    pNode = pNode->SearchByNode(data, m_pCompare, dwCompareParam);
    if (pNode != NULL)
      pData = pNode->m_pData;
  }

  return pData;
}
开发者ID:Artorios,项目名称:rootkit.com,代码行数:15,代码来源:KBinaryTree.cpp


示例3: NS_ENSURE_ARG_POINTER

NS_IMETHODIMP
nsHTMLEditor::ShowInlineTableEditingUI(nsIDOMElement * aCell)
{
  NS_ENSURE_ARG_POINTER(aCell);

  // do nothing if aCell is not a table cell...
  if (!nsHTMLEditUtils::IsTableCell(aCell))
    return NS_OK;

  if (mInlineEditedCell) {
    NS_ERROR("call HideInlineTableEditingUI first");
    return NS_ERROR_UNEXPECTED;
  }

  // the resizers and the shadow will be anonymous children of the body
  nsIDOMElement *bodyElement = GetRoot();
  NS_ENSURE_TRUE(bodyElement, NS_ERROR_NULL_POINTER);

  CreateAnonymousElement(NS_LITERAL_STRING("a"), bodyElement,
                         NS_LITERAL_STRING("mozTableAddColumnBefore"),
                         PR_FALSE, getter_AddRefs(mAddColumnBeforeButton));
  CreateAnonymousElement(NS_LITERAL_STRING("a"), bodyElement,
                         NS_LITERAL_STRING("mozTableRemoveColumn"),
                         PR_FALSE, getter_AddRefs(mRemoveColumnButton));
  CreateAnonymousElement(NS_LITERAL_STRING("a"), bodyElement,
                         NS_LITERAL_STRING("mozTableAddColumnAfter"),
                         PR_FALSE, getter_AddRefs(mAddColumnAfterButton));

  CreateAnonymousElement(NS_LITERAL_STRING("a"), bodyElement,
                         NS_LITERAL_STRING("mozTableAddRowBefore"),
                         PR_FALSE, getter_AddRefs(mAddRowBeforeButton));
  CreateAnonymousElement(NS_LITERAL_STRING("a"), bodyElement,
                         NS_LITERAL_STRING("mozTableRemoveRow"),
                         PR_FALSE, getter_AddRefs(mRemoveRowButton));
  CreateAnonymousElement(NS_LITERAL_STRING("a"), bodyElement,
                         NS_LITERAL_STRING("mozTableAddRowAfter"),
                         PR_FALSE, getter_AddRefs(mAddRowAfterButton));

  AddMouseClickListener(mAddColumnBeforeButton);
  AddMouseClickListener(mRemoveColumnButton);
  AddMouseClickListener(mAddColumnAfterButton);
  AddMouseClickListener(mAddRowBeforeButton);
  AddMouseClickListener(mRemoveRowButton);
  AddMouseClickListener(mAddRowAfterButton);

  mInlineEditedCell = aCell;
  return RefreshInlineTableEditingUI();
}
开发者ID:LittleForker,项目名称:mozilla-central,代码行数:48,代码来源:nsHTMLInlineTableEditor.cpp


示例4: JoinPathBelow

	FileInfo FileSourceFS::Lookup(const std::string &path)
	{
		const std::string fullpath = JoinPathBelow(GetRoot(), path);
		const std::wstring wfullpath = transcode_utf8_to_utf16(fullpath);
		DWORD attrs = GetFileAttributesW(wfullpath.c_str());
		const FileInfo::FileType ty = file_type_for_attributes(attrs);
		Time::DateTime modtime;
		if (ty == FileInfo::FT_FILE || ty == FileInfo::FT_DIR) {
			HANDLE hfile = CreateFileW(wfullpath.c_str(), GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
			if (hfile != INVALID_HANDLE_VALUE) {
				modtime = file_modtime_for_handle(hfile);
				CloseHandle(hfile);
			}
		}
		return MakeFileInfo(path, ty, modtime);
	}
开发者ID:RevReese,项目名称:pioneer-sp,代码行数:16,代码来源:FileSystemWin32.cpp


示例5: SetDirection

bool Styx::Update(GameTime time)
{
    Playfield const &pf = *GetPlayfield();

    // create set of possibile directions to move in
    std::vector<Direction> choices;
    for (int n = 0; n < 4; ++n)
    {
        Direction dir = (Direction::Type)n;

        // can't reverse direction
        if (dir.Opposite() == direction)
            continue;

        Playfield::Element element = pf.At(location + dir.GetVector());
        if (element == Playfield::Line)
        {
            choices.push_back(Direction::Type(n));
        }
    }

    // if we have no where to go, reverse
    if (choices.empty())
    {
        direction = direction.Opposite();
    }
    else
    {
        // choose new random direction
        SetDirection(choices[rand() % choices.size()]);

        if (move_toward_player && choices.size() > 1)
        {
            Point pos_player = GetRoot()->GetWorld()->GetPlayer()->GetLocation();
            float min_dist = 0;
            bool first = true;
            foreach (Direction dir, choices)
            {
                float dist = (location + dir.GetVector() - pos_player).Length();
                if (first || dist < min_dist)
                {
                    first = false;
                    min_dist = dist;
                    SetDirection(dir);
                }
            }
        }
开发者ID:kotetsuy,项目名称:xiq,代码行数:47,代码来源:Styx.cpp


示例6: Dispose

bool CBlurayDirectory::GetDirectory(const CURL& url, CFileItemList &items)
{
  Dispose();
  m_url = url;
  std::string root = m_url.GetHostName();
  std::string file = m_url.GetFileName();
  URIUtils::RemoveSlashAtEnd(file);
  URIUtils::RemoveSlashAtEnd(root);

  m_dll = new DllLibbluray();
  if (!m_dll->Load())
  {
    CLog::Log(LOGERROR, "CBlurayDirectory::GetDirectory - failed to load dll");
    return false;
  }

  m_dll->bd_register_dir(DllLibbluray::dir_open);
  m_dll->bd_register_file(DllLibbluray::file_open);
  m_dll->bd_set_debug_handler(DllLibbluray::bluray_logger);
  m_dll->bd_set_debug_mask(DBG_CRIT | DBG_BLURAY | DBG_NAV);

  m_bd = m_dll->bd_open(root.c_str(), NULL);

  if(!m_bd)
  {
    CLog::Log(LOGERROR, "CBlurayDirectory::GetDirectory - failed to open %s", root.c_str());
    return false;
  }

  if(file == "root")
    GetRoot(items);
  else if(file == "root/titles")
    GetTitles(false, items);
  else
  {
    CURL url2 = GetUnderlyingCURL(url);
    CDirectory::CHints hints;
    hints.flags = m_flags;
    if (!CDirectory::GetDirectory(url2, items, hints))
      return false;
  }

  items.AddSortMethod(SortByTrackNumber,  554, LABEL_MASKS("%L", "%D", "%L", ""));    // FileName, Duration | Foldername, empty
  items.AddSortMethod(SortBySize,         553, LABEL_MASKS("%L", "%I", "%L", "%I"));  // FileName, Size | Foldername, Size

  return true;
}
开发者ID:MrMC,项目名称:mrmc,代码行数:47,代码来源:BlurayDirectory.cpp


示例7: main

//////////////////////////////////////////////////////////////////  PUBLIC
//---------------------------------------------------- Fonctions publiques
int main ( void )
{
	InitMemoire ( );
	racine = GetRoot ( );

	FILE * lecture = fopen ( "input.txt" , "r");

	uint64_t * nombre = malloc ( sizeof ( uint64_t ) );
	while ( EOF != (fscanf ( lecture, "%" PRIu64 "", nombre ) ) )
	{
		get_prime_factors ( * nombre );
		print_prime_factors ( * nombre );
	}

	End ( racine );
	return 0;
} //----- fin de Main
开发者ID:PatFin,项目名称:B3157,代码行数:19,代码来源:Question10.2.c


示例8: ComputeMaxNodeVal

void BubbleTree::PrepareDrawing()	{

	DrawTree::PrepareDrawing();
	/*
	if (minmax)	{
		double max = ComputeMaxNodeVal(root);
		double min = ComputeMinNodeVal(root);
		cerr << min << '\t' << max << '\n';
		// exit(1);
		minnodeval = min;
		nodescale = maxnodeval / sqrt(max - min);
	}
	else	{
	*/
		double max = ComputeMaxNodeVal(GetRoot());
		nodescale = maxnodeval / exp(0.5 * nodepower * log(max));
	// }
}
开发者ID:bayesiancook,项目名称:coevol,代码行数:18,代码来源:DrawTree.cpp


示例9: PODOFO_RAISE_ERROR

void PdfPagesTree::DeletePageFromNode( PdfObject* pParent, const PdfObjectList & rlstParents, 
                                       int nIndex, PdfObject* pPage )
{
    if( !pParent || !pPage ) 
    {
        PODOFO_RAISE_ERROR( ePdfError_InvalidHandle );
    }

    // 1. Delete the reference from the kids array of pParent
    // 2. Decrease count of every node in lstParents (which also includes pParent)
    // 3. Remove empty page nodes

    // TODO: Tell cache to free page object

    // 1. Delete reference
    this->DeletePageNode( pParent, nIndex ) ;

    // 2. Decrease count
    PdfObjectList::const_reverse_iterator itParents = rlstParents.rbegin();
    while( itParents != rlstParents.rend() )
    {
        this->ChangePagesCount( *itParents, -1 );

        ++itParents;
    } 

    // 3. Remove empty pages nodes
    itParents = rlstParents.rbegin();
    while( itParents != rlstParents.rend() )
    {
        // Never delete root node
        if( IsEmptyPageNode( *itParents ) && *itParents != GetRoot() ) 
        {
            PdfObject* pParentOfNode = *(itParents + 1);
            int nKidsIndex = this->GetPosInKids( *itParents, pParentOfNode );
            DeletePageNode( pParentOfNode, nKidsIndex );

            // Delete empty page nodes
            delete this->GetObject()->GetOwner()->RemoveObject( (*itParents)->Reference() );
        }

        ++itParents;
    } 
}
开发者ID:yjwong,项目名称:podofo,代码行数:44,代码来源:PdfPagesTree.cpp


示例10: solve

	inline void solve(void) {
		scanf("%d%d%d", &p, &a, &k);
		Divid(p - 1);
		if (p == 2) {
			if (k == 0) printf("%d\n%d\n", 1, 0);
			else printf("%d\n%d\n",1, 1);
			return;
		}
		int g = GetRoot(p);
		int tmp = Pow(g, a, p);
		VII ret = BabyStep(tmp, k, p);
		SII Ans;
		for (VII::iterator it = ret.begin(); it != ret.end(); it++) {
			Ans.insert(Pow(g, *it, p));
		}
		printf("%d\n", Ans.size());
		for (SII::iterator it = Ans.begin(); it != Ans.end(); it++)
			printf("%d\n", *it);
	}
开发者ID:AiHaibara,项目名称:acm-icpc,代码行数:19,代码来源:1420.cpp


示例11: GetRoot

void wxXmlRcEditDocument::Upgrade()
{
    int v1,v2,v3,v4;
    long version;
    wxXmlNode *node = GetRoot();
    wxString verstr = wxT("0.0.0.0");
    node->GetPropVal(wxT("version"),verstr);
    if (wxSscanf(verstr.c_str(), wxT("%i.%i.%i.%i"),
        &v1, &v2, &v3, &v4) == 4)
        version = v1*256*256*256+v2*256*256+v3*256+v4;
    else
        version = 0;
    if (!version)
    {
        UpgradeNode(node);
    }
    node->DeleteProperty(wxT("version"));
    node->AddProperty(wxT("version"), WX_XMLRES_CURRENT_VERSION_STRING);
}
开发者ID:HackLinux,项目名称:chandler-1,代码行数:19,代码来源:editor.cpp


示例12: GetRoot

void CPDF_Document::DeletePage(int iPage) {
  CPDF_Dictionary* pRoot = GetRoot();
  if (!pRoot) {
    return;
  }
  CPDF_Dictionary* pPages = pRoot->GetDict("Pages");
  if (!pPages) {
    return;
  }
  int nPages = pPages->GetInteger("Count");
  if (iPage < 0 || iPage >= nPages) {
    return;
  }
  CFX_ArrayTemplate<CPDF_Dictionary*> stack;
  stack.Add(pPages);
  if (InsertDeletePDFPage(this, pPages, iPage, NULL, FALSE, stack) < 0) {
    return;
  }
  m_PageList.RemoveAt(iPage);
}
开发者ID:primiano,项目名称:pdfium-merge,代码行数:20,代码来源:fpdf_edit_doc.cpp


示例13: cElement

// GetNamespaces
void COpcXmlDocument::GetNamespaces(COpcStringMap& cNamespaces)
{
    // clear the current set.
    cNamespaces.RemoveAll();

    // check for a valid root element.
    COpcXmlElement cElement(GetRoot());

    if (cElement == NULL)
    {
        return;
    }

    // add the namespace for the root element.
    COpcString cPrefix = cElement.GetPrefix();

    if (!cPrefix.IsEmpty())
    {
        cNamespaces[cPrefix] = cElement.GetNamespace();
    }

    // fetch the attributes from the root element.
    COpcXmlAttributeList cAttributes;

    if (cElement.GetAttributes(cAttributes) > 0)
    {
        for (UINT ii = 0; ii < cAttributes.GetSize(); ii++)
        {
            if (cAttributes[ii].GetPrefix() == OPCXML_NAMESPACE_ATTRIBUTE)
            {
                COpcString cName = cAttributes[ii].GetQualifiedName().GetName();

                // don't add the default namespace.
                if (!cName.IsEmpty())
                {
                    cNamespaces[cName] = cAttributes[ii].GetValue();
                }
            }
        }
    }
}
开发者ID:OPCFoundation,项目名称:UA-.NET,代码行数:42,代码来源:COpcXmlDocument.cpp


示例14: RemoveMouseClickListener

NS_IMETHODIMP
nsHTMLEditor::HideInlineTableEditingUI()
{
  mInlineEditedCell = nsnull;

  RemoveMouseClickListener(mAddColumnBeforeButton);
  RemoveMouseClickListener(mRemoveColumnButton);
  RemoveMouseClickListener(mAddColumnAfterButton);
  RemoveMouseClickListener(mAddRowBeforeButton);
  RemoveMouseClickListener(mRemoveRowButton);
  RemoveMouseClickListener(mAddRowAfterButton);

  // get the presshell's document observer interface.
  nsCOMPtr<nsIPresShell> ps;
  GetPresShell(getter_AddRefs(ps));
  // We allow the pres shell to be null; when it is, we presume there
  // are no document observers to notify, but we still want to
  // UnbindFromTree.

  // get the root content node.

  nsIDOMElement *bodyElement = GetRoot();

  nsCOMPtr<nsIContent> bodyContent( do_QueryInterface(bodyElement) );
  NS_ENSURE_TRUE(bodyContent, NS_ERROR_FAILURE);

  DeleteRefToAnonymousNode(mAddColumnBeforeButton, bodyContent, ps);
  mAddColumnBeforeButton = nsnull;
  DeleteRefToAnonymousNode(mRemoveColumnButton, bodyContent, ps);
  mRemoveColumnButton = nsnull;
  DeleteRefToAnonymousNode(mAddColumnAfterButton, bodyContent, ps);
  mAddColumnAfterButton = nsnull;
  DeleteRefToAnonymousNode(mAddRowBeforeButton, bodyContent, ps);
  mAddRowBeforeButton = nsnull;
  DeleteRefToAnonymousNode(mRemoveRowButton, bodyContent, ps);
  mRemoveRowButton = nsnull;
  DeleteRefToAnonymousNode(mAddRowAfterButton, bodyContent, ps);
  mAddRowAfterButton = nsnull;

  return NS_OK;
}
开发者ID:LittleForker,项目名称:mozilla-central,代码行数:41,代码来源:nsHTMLInlineTableEditor.cpp


示例15: Dispose

bool CBlurayDirectory::GetDirectory(const CStdString& path, CFileItemList &items)
{
  Dispose();
  m_url.Parse(path);
  CStdString root = m_url.GetHostName();
  CStdString file = m_url.GetFileName();
  URIUtils::RemoveSlashAtEnd(file);

  m_dll = new DllLibbluray();
  if (!m_dll->Load())
  {
    CLog::Log(LOGERROR, "CBlurayDirectory::GetDirectory - failed to load dll");
    return false;
  }

  m_dll->bd_register_dir(DllLibbluray::dir_open);
  m_dll->bd_register_file(DllLibbluray::file_open);
  m_dll->bd_set_debug_handler(DllLibbluray::bluray_logger);
  m_dll->bd_set_debug_mask(DBG_CRIT | DBG_BLURAY | DBG_NAV);

  m_bd = m_dll->bd_open(root.c_str(), NULL);

  if(!m_bd)
  {
    CLog::Log(LOGERROR, "CBlurayDirectory::GetDirectory - failed to open %s", root.c_str());
    return false;
  }

  if(file == "")
    GetRoot(items);
  else if(file == "titles")
    GetTitles(false, items);
  else
    return false;

  items.AddSortMethod(SORT_METHOD_TRACKNUM , 554, LABEL_MASKS("%L", "%D", "%L", ""));    // FileName, Duration | Foldername, empty
  items.AddSortMethod(SORT_METHOD_SIZE     , 553, LABEL_MASKS("%L", "%I", "%L", "%I"));  // FileName, Size | Foldername, Size

  return true;
}
开发者ID:cpaowner,项目名称:xbmc,代码行数:40,代码来源:BlurayDirectory.cpp


示例16: switch

bool Button::HandleEventSelf(const SDL_Event& ev)
{
	switch (ev.type) {
		case SDL_MOUSEBUTTONDOWN: {
			if ((ev.button.button == SDL_BUTTON_LEFT) && MouseOver(ev.button.x, ev.button.y) && gui->MouseOverElement(GetRoot(), ev.motion.x, ev.motion.y))
			{
				clicked = true;
			};
			break;
		}
		case SDL_MOUSEBUTTONUP: {
			if ((ev.button.button == SDL_BUTTON_LEFT) && MouseOver(ev.button.x, ev.button.y) && clicked)
			{
				if (!Clicked.empty())
				{
					Clicked();
				}
				else
				{
					LogObject() << "Button " << label << " clicked without callback";
				}
				clicked = false;
				return true;
			}
		}
		case SDL_MOUSEMOTION: {
			if (MouseOver(ev.motion.x, ev.motion.y) && gui->MouseOverElement(GetRoot(), ev.motion.x, ev.motion.y))
			{
				hovered = true;
			}
			else
			{
				hovered = false;
				clicked = false;
			}
			break;
		}
	}
	return false;
}
开发者ID:BrainDamage,项目名称:spring,代码行数:40,代码来源:Button.cpp


示例17: GetRoot

	//! called during the initialization of the entity
	void SFXManager::Init()
	{
		super::Init();

		m_Root = GetRoot();

		m_PlayerPulseManager = static_cast<PulseManager*>(GetChildByName("PlayerPulseManager"));
		m_PlayerLaserManager = static_cast<LaserManager*>(GetChildByName("PlayerLaserManager"));
		m_PlayerPelletManager = static_cast<PelletManager*>(GetChildByName("PlayerPelletManager"));
		m_PlayerSidePulseManager = static_cast<PulseManager*>(GetChildByName("PlayerSidePulseManager"));
		m_PlayerSideLaserManager = static_cast<LaserManager*>(GetChildByName("PlayerSideLaserManager"));
		m_PlayerSidePelletManager = static_cast<PelletManager*>(GetChildByName("PlayerSidePelletManager"));
		m_EnemyPulseManager = static_cast<PulseManager*>(GetChildByName("EnemyPulseManager"));
		m_BossPulseManager = static_cast<PulseManager*>(GetChildByName("BossPulseManager"));		
		m_EnemyLaserManager = static_cast<LaserManager*>(GetChildByName("EnemyLaserManager"));
		m_EnemyPelletManager = static_cast<PelletManager*>(GetChildByName("EnemyPelletManager"));
	
		if(Entity* pSkyBox = m_Root->GetChildByType("SkyBoxEntity"))
		{
			m_SkyBoxMaterial = pSkyBox->GetComponent<GraphicComponent>()->GetMaterial();
		}
	}
开发者ID:aminere,项目名称:VLADHeavyStrikePublic,代码行数:23,代码来源:SFXManager.cpp


示例18: dlg

/// Tries to open an existing file; if not, creates a new one.
/// Clears contents if unexpected root node name.
/// Reports problems in a message box.
/// @param parent Window to parent message boxes.
/// @param filename Name only of file - will be created in standard user config directory.
SavedState::SavedState(wxWindow * parent, const wxString & filename)
{
    mFilename = wxStandardPaths::Get().GetUserConfigDir() + wxFileName::GetPathSeparator() + filename;
    bool ok = false;
    if (!wxFile::Exists(mFilename)) {
        wxMessageDialog dlg(parent, wxT("No saved preferences file found.  Default values will be used."), wxT("No saved preferences"));
        dlg.ShowModal();
    }
    else if (!Load(mFilename)) { //already produces a warning message box
    }
    else if (wxT("Ingexgui") != GetRoot()->GetName()) {
        wxMessageDialog dlg(parent, wxT("Saved preferences file \"") + mFilename + wxT("\": has unrecognised data: re-creating with default values."), wxT("Unrecognised saved preferences"), wxICON_EXCLAMATION | wxOK);
        dlg.ShowModal();
    }
    else {
        ok = true;
    }
    if (!ok) {
        SetRoot(new wxXmlNode(wxXML_ELEMENT_NODE, wxT("Ingexgui")));
        Save();
    }
}
开发者ID:dluobo,项目名称:ingex,代码行数:27,代码来源:savedstate.cpp


示例19: wxCSConv

bool wxXmlDocument::Save(wxOutputStream& stream, int indentstep) const
{
    if ( !IsOk() )
        return false;

    wxString s;

    wxMBConv *convMem = NULL,
             *convFile;

#if wxUSE_UNICODE
    convFile = new wxCSConv(GetFileEncoding());
    convMem = NULL;
#else
    if ( GetFileEncoding().CmpNoCase(GetEncoding()) != 0 )
    {
        convFile = new wxCSConv(GetFileEncoding());
        convMem = new wxCSConv(GetEncoding());
    }
    else // file and in-memory encodings are the same, no conversion needed
    {
        convFile =
        convMem = NULL;
    }
#endif

    s.Printf(wxT("<?xml version=\"%s\" encoding=\"%s\"?>\n"),
             GetVersion().c_str(), GetFileEncoding().c_str());
    OutputString(stream, s);

    OutputNode(stream, GetRoot(), 0, convMem, convFile, indentstep);
    OutputString(stream, wxT("\n"));

    delete convFile;
    delete convMem;

    return true;
}
开发者ID:252525fb,项目名称:rpcs3,代码行数:38,代码来源:xml.cpp


示例20: main

int
main(int argc, char **argv)
{
	RootStruct *root = GetRoot();
	word maxav = 0;

	while (TRUE)
	{
		word av = root->LoadAverage;

		if (av > maxav) maxav = av;

	if (argc == 1)
	{
		printf("LowPriAv:  %8lu, HiPriLat:    %8lu, MaxLat: %8lu\n",
			av ,root->Latency,root->MaxLatency);
		printf("MaxAv: %lu\n", maxav);
		printf("LocalMsgs: %8lu, BuffMsgs:    %8lu, Time:  %8lu\n",
			root->LocalMsgs,root->BufferedMsgs,root->Time);
		printf("Timer:     %#8lx, %ld\n\n",
		       root->Timer, root->Timer);
	}
	else if (argc == 2)
	{
		IOdebug("LowPriAv:  %x, HiPriLat:    %x, MaxLat: %x",
			av ,root->Latency,root->MaxLatency);
		IOdebug("MaxAv: %x", maxav);
		IOdebug("LocalMsgs: %x, BuffMsgs:    %x, Time:  %x",
			root->LocalMsgs,root->BufferedMsgs,root->Time);
		IOdebug("Timer:  %x\n", root->Timer);
	}
	else
	{
		donowt(3);
	}
		Delay(OneSec);
	}
}
开发者ID:axelmuhr,项目名称:Helios-NG,代码行数:38,代码来源:showroot.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ GetRootComponent函数代码示例发布时间:2022-05-30
下一篇:
C++ GetRhsVar函数代码示例发布时间: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