Ion
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Timeline Class Reference

Copyright 2016 Google Inc. More...

#include "timeline.h"

Classes

class  const_iterator
 Traverses the hierarchy in pre-order. More...
 

Public Member Functions

 Timeline ()
 
 Timeline (std::unique_ptr< TimelineNode > root)
 
 Timeline (Timeline &&other)
 
const_iterator begin () const
 Returns a const iterator over the timeline. The root node is skipped. More...
 
const_iterator end () const
 Returns a const iterator to the end of the timeline. More...
 
const TimelineNodeGetRoot () const
 Returns a pointer to the root node. More...
 

Detailed Description

Copyright 2016 Google Inc.

All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.A hierarchical representation of tracing data.

Example usage: Timeline timeline = ion::profile::GetCallTraceManager()->GetTimeline();

///< Iterate over all nodes (skips the root). for (auto node : timeline) { ///< Do something with the node std::cout << node->GetName() << " " << node->GetDuration() << std::endl; }

///< Search for events named "Foo" and iterate over them. TimelineSearch search(timeline, "Foo"); for (auto event : search) { ///< Do something with the event std::cout << event->GetName() << " " << event->GetDuration() << std::endl; }

Definition at line 47 of file timeline.h.

Constructor & Destructor Documentation

Timeline::Timeline ( )
inline

Definition at line 49 of file timeline.h.

Timeline::Timeline ( std::unique_ptr< TimelineNode root)
inlineexplicit

Definition at line 50 of file timeline.h.

Timeline::Timeline ( Timeline &&  other)
inline

Definition at line 52 of file timeline.h.

Member Function Documentation

const_iterator Timeline::begin ( ) const
inline

Returns a const iterator over the timeline. The root node is skipped.

Definition at line 75 of file timeline.h.

Referenced by TimelineSearch::begin().

const_iterator Timeline::end ( ) const
inline

Returns a const iterator to the end of the timeline.

Definition at line 79 of file timeline.h.

Referenced by TimelineSearch::begin(), TimelineSearch::end(), and TimelineSearch::const_iterator::operator++().

const TimelineNode* Timeline::GetRoot ( ) const
inline

Returns a pointer to the root node.

The root node is not an event and is skipped by the iterator.

Definition at line 83 of file timeline.h.


The documentation for this class was generated from the following file: