AcUtils
A high performance abstraction layer for AccuRev
Public Member Functions | Internal Functions | Properties | List of all members
AcUtils.AcStream Class Reference

A stream object that defines the attributes of an AccuRev stream. AcStream objects are instantiated during AcDepot and AcDepots construction. More...

Collaboration diagram for AcUtils.AcStream:
Collaboration graph
[legend]

Public Member Functions

AcStream getBasis ()
 Get this stream's basis (parent) stream. More...
 
string ToString (string format, IFormatProvider provider)
 The actual implementation of the ToString method. More...
 
Equality comparison
bool Equals (AcStream other)
 IEquatable implementation to determine the equality of instances of type AcStream. Uses the stream ID number and depot to compare instances. More...
 
override bool Equals (object other)
 Overridden to determine equality. More...
 
override int GetHashCode ()
 Override appropriate for type AcStream. More...
 

Internal Functions

 AcStream ()
 AcStream objects are instantiated during AcDepot and AcDepots construction. This constructor is called internally and not by user code. More...
 

Properties

string Name [get, set]
 Stream name. More...
 
int ID [get, set]
 Stream ID number. More...
 
string BasisName [get, set]
 Basis stream name. More...
 
int BasisID [get, set]
 Basis stream ID number. More...
 
AcDepot Depot [get, set]
 Depot the stream is located in. More...
 
bool IsDynamic [get, set]
 Whether the stream is a dynamic stream or not. false in the case of a workspace, snapshot or passthrough stream. More...
 
StreamType Type [get, set]
 The kind of stream: unknown, normal, dynamic, regular, workspace, snapshot, passthru, passthrough, gated or staging. More...
 
DateTime Time [get, set]
 Stream's time basis or when the snapshot stream was created, otherwise null. More...
 
DateTime StartTime [get, set]
 Stream's creation time or last time its name, time basis or state (remove, reactivate, reparent) changed. More...
 
bool Hidden [get, set]
 Whether the stream is hidden or not. More...
 
bool HasDefaultGroup [get, set]
 Whether the stream has a default group or not. More...
 

Order comparison

int CompareTo (AcStream other)
 Generic IComparable implementation (default) for comparing AcStream objects to sort by stream name. More...
 
int IComparable. CompareTo (object other)
 Pre-generic interface implementation for code using reflection. More...
 

Detailed Description

A stream object that defines the attributes of an AccuRev stream. AcStream objects are instantiated during AcDepot and AcDepots construction.

Definition at line 74 of file AcStreams.cs.

Constructor & Destructor Documentation

AcUtils.AcStream.AcStream ( )
inlinepackage

AcStream objects are instantiated during AcDepot and AcDepots construction. This constructor is called internally and not by user code.

Definition at line 95 of file AcStreams.cs.

Referenced by AcUtils.AcStream.CompareTo().

Member Function Documentation

int AcUtils.AcStream.CompareTo ( AcStream  other)
inline

Generic IComparable implementation (default) for comparing AcStream objects to sort by stream name.

Parameters
otherAn AcStream object to compare with this instance.
Returns
Value indicating the relative order of the AcStream objects being compared.
See also
AcStreams constructor

Definition at line 148 of file AcStreams.cs.

Referenced by AcUtils.AcStream.CompareTo().

int IComparable. AcUtils.AcStream.CompareTo ( object  other)
inlineprivate

Pre-generic interface implementation for code using reflection.

Parameters
otherAn AcStream object to compare with this instance.
Returns
Return value of generic CompareTo(AcStream) version.
Exceptions
ArgumentExceptionthrown if argument is not an AcStream object.

Definition at line 165 of file AcStreams.cs.

bool AcUtils.AcStream.Equals ( AcStream  other)
inline

IEquatable implementation to determine the equality of instances of type AcStream. Uses the stream ID number and depot to compare instances.

Parameters
otherThe AcStream object being compared to this instance.
Returns
true if AcStream other is the same, false otherwise.

Definition at line 106 of file AcStreams.cs.

Referenced by AcUtils.AcStream.Equals().

override bool AcUtils.AcStream.Equals ( object  other)
inline

Overridden to determine equality.

Returns
Return value of generic Equals(AcStream) version.

Definition at line 119 of file AcStreams.cs.

AcStream AcUtils.AcStream.getBasis ( )
inline

Get this stream's basis (parent) stream.

Returns
Basis AcStream object for this stream or null if not found.

Definition at line 284 of file AcStreams.cs.

override int AcUtils.AcStream.GetHashCode ( )
inline

Override appropriate for type AcStream.

Returns
Hash of stream ID number and depot.

Definition at line 131 of file AcStreams.cs.

string AcUtils.AcStream.ToString ( string  format,
IFormatProvider  provider 
)
inline

The actual implementation of the ToString method.

Parameters
formatThe format specifier to use, e.g. Console.WriteLine(stream.ToString("lv"));
providerAllow clients to format output for their own types using ICustomFormatter.
Returns
The formatted string.
Exceptions
FormatExceptionthrown if an invalid format string is specified.
Format specifiers:
  • G Stream name. Default when not using a format specifier.
  • LV Long version (verbose).
  • I Stream ID number.
  • T Stream type: unknown, normal, dynamic, regular, workspace, snapshot, passthru, passthrough, gated or staging.
  • BT Stream's basis time: snapshot stream creation or dynamic stream time basis.
  • C Time the stream was created.
  • BN Basis stream name.
  • BI Basis stream ID number.
  • D Depot name.
  • DY True if dynamic, False in the case of workspace, snapshot or passthrough.
  • H True if stream is hidden, False otherwise.
  • DG True if stream has a default group, False otherwise.

Definition at line 311 of file AcStreams.cs.

Property Documentation

int AcUtils.AcStream.BasisID
getset

Basis stream ID number.

Definition at line 206 of file AcStreams.cs.

Referenced by AcUtils.AcDepot.getBasis(), and AcUtils.AcStreams.initAsync().

string AcUtils.AcStream.BasisName
getset

Basis stream name.

Definition at line 197 of file AcStreams.cs.

Referenced by AcUtils.AcStreams.initAsync().

AcDepot AcUtils.AcStream.Depot
getset

Depot the stream is located in.

Definition at line 215 of file AcStreams.cs.

Referenced by AcUtils.AcStream.GetHashCode(), and AcUtils.AcStreams.initAsync().

bool AcUtils.AcStream.HasDefaultGroup
getset

Whether the stream has a default group or not.

Definition at line 275 of file AcStreams.cs.

Referenced by AcUtils.AcStreams.initAsync().

bool AcUtils.AcStream.Hidden
getset

Whether the stream is hidden or not.

Definition at line 266 of file AcStreams.cs.

Referenced by AcUtils.AcStreams.initAsync().

int AcUtils.AcStream.ID
getset

Stream ID number.

Definition at line 188 of file AcStreams.cs.

Referenced by AcUtils.AcDepot.getChildrenAsync(), AcUtils.AcStream.GetHashCode(), and AcUtils.AcStreams.initAsync().

bool AcUtils.AcStream.IsDynamic
getset

Whether the stream is a dynamic stream or not. false in the case of a workspace, snapshot or passthrough stream.

Definition at line 225 of file AcStreams.cs.

Referenced by AcUtils.AcStreams.initAsync().

string AcUtils.AcStream.Name
getset

Stream name.

Definition at line 179 of file AcStreams.cs.

Referenced by AcUtils.AcStream.CompareTo(), and AcUtils.AcStreams.initAsync().

DateTime AcUtils.AcStream.StartTime
getset

Stream's creation time or last time its name, time basis or state (remove, reactivate, reparent) changed.

Definition at line 257 of file AcStreams.cs.

Referenced by AcUtils.AcStreams.initAsync().

DateTime AcUtils.AcStream.Time
getset

Stream's time basis or when the snapshot stream was created, otherwise null.

The XML attribute time exists only for snapshot streams or when a dynamic stream has a time basis.

Note
The result of using As transaction # in the GUI results in a time basis set on the stream.

Definition at line 248 of file AcStreams.cs.

Referenced by AcUtils.AcStreams.initAsync().

StreamType AcUtils.AcStream.Type
getset

The kind of stream: unknown, normal, dynamic, regular, workspace, snapshot, passthru, passthrough, gated or staging.

Definition at line 235 of file AcStreams.cs.

Referenced by AcUtils.AcDepot.getChildrenAsync(), and AcUtils.AcStreams.initAsync().