A Discrete-Event Network Simulator
API
grid.TimelineDataRange Class Reference

TimelineDataRange. More...

Public Member Functions

def __init__ (self, name='')
 Initializer. More...
 
def add_range (self, range)
 Add range. More...
 
def get_all (self)
 Get all ranges. More...
 
def get_bounds (self)
 Get bounds. More...
 
def get_ranges (self, start, end)
 Get selected ranges. More...
 
def get_ranges_bounds (self, start, end)
 Get ranges bounds. More...
 
def sort (self)
 Sort ranges. More...
 

Public Attributes

 name
 name More...
 
 ranges
 ranges More...
 

Private Member Functions

def __search (self, key)
 Search. More...
 

Detailed Description

TimelineDataRange.

Definition at line 87 of file grid.py.

Constructor & Destructor Documentation

◆ __init__()

def grid.TimelineDataRange.__init__ (   self,
  name = '' 
)

Initializer.

Parameters
selfthis object
namename

Definition at line 92 of file grid.py.

Member Function Documentation

◆ __search()

def grid.TimelineDataRange.__search (   self,
  key 
)
private

Search.

Parameters
selfthis object
keykey
Returns
index if found or -1 if not found

Definition at line 100 of file grid.py.

References grid.TimelineDataRange.ranges, and grid.Timeline.ranges.

Referenced by grid.TimelineEvent.get_events(), grid.TimelineEvent.get_events_bounds(), grid.TimelineDataRange.get_ranges(), and grid.TimelineDataRange.get_ranges_bounds().

+ Here is the caller graph for this function:

◆ add_range()

def grid.TimelineDataRange.add_range (   self,
  range 
)

Add range.

Parameters
selfthis object
rangerange
Returns
none

Definition at line 118 of file grid.py.

References grid.TimelineDataRange.ranges, and grid.Timeline.ranges.

◆ get_all()

def grid.TimelineDataRange.get_all (   self)

Get all ranges.

Parameters
selfthis object
Returns
the ranges

Definition at line 125 of file grid.py.

References grid.TimelineDataRange.ranges, and grid.Timeline.ranges.

◆ get_bounds()

def grid.TimelineDataRange.get_bounds (   self)

Get bounds.

Parameters
selfthis object
Returns
the bounds

Definition at line 171 of file grid.py.

References grid.TimelineDataRange.ranges, and grid.Timeline.ranges.

◆ get_ranges()

def grid.TimelineDataRange.get_ranges (   self,
  start,
  end 
)

Get selected ranges.

Parameters
selfthis object
startrange start
endrange end
Returns
the range or and empty list

Definition at line 131 of file grid.py.

References grid.TimelineDataRange.__search(), grid.TimelineEvent.__search(), grid.TimelineDataRange.ranges, and grid.Timeline.ranges.

+ Here is the call graph for this function:

◆ get_ranges_bounds()

def grid.TimelineDataRange.get_ranges_bounds (   self,
  start,
  end 
)

Get ranges bounds.

Parameters
selfthis object
startrange start
endrange end
Returns
range

Definition at line 148 of file grid.py.

References grid.TimelineDataRange.__search(), grid.TimelineEvent.__search(), grid.TimelineDataRange.ranges, and grid.Timeline.ranges.

+ Here is the call graph for this function:

◆ sort()

def grid.TimelineDataRange.sort (   self)

Sort ranges.

Parameters
selfthis object
Returns
none

Definition at line 165 of file grid.py.

References grid.TimelineDataRange.ranges, and grid.Timeline.ranges.

Member Data Documentation

◆ name

grid.TimelineDataRange.name

name

Definition at line 97 of file grid.py.

◆ ranges


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