Galactix Home | Main Page | Class Hierarchy | Data Structures | Function List

ITournamentSchedule Interface Reference

The ITournamentSchedule object. More...

#include <tsssx.idl>

Inherits IDispatch.


Public Methods

HRESULT ToString ([out, retval] BSTR *pVal)
 Get a String representation of this object. More...

HRESULT Name ([out, retval] BSTR *pVal)
 Get the Name property of this object as a String. More...

HRESULT ID ([out, retval] long *pVal)
 Get the ID property of this object as a long. More...

HRESULT StartDate ([out, retval] DATE *pVal)
 Get the StartDate property of this object as a DATE. More...

HRESULT EndDate ([out, retval] DATE *pVal)
 Get the EndDate property of this object as a DATE. More...

HRESULT GameDurationMinutes ([out, retval] long *pVal)
 Get the GameDurationMinutes property of this object as an long. More...

HRESULT MasterScheduleID ([out, retval] long *pVal)
 Get the MasterScheduleID property of this object as a long. More...

HRESULT TournamentType ([out, retval] long *pVal)
 Get the TournamentType property of this object as an long. More...

HRESULT Availability ([out, retval] IAvailability **pVal)
 Get the IAvailabiity object associated with this object. More...

HRESULT getMasterSchedule ([out, retval] IMasterSchedule **ppIMasterSchedule)
 Get the IMasterSchedule for this schedule. More...

HRESULT getNumOfVenues ([out, retval] long *plNum)
 Get the number of IVenue's (fields) in use by the tournament. More...

HRESULT getNumOfTeams ([out, retval] long *plNum)
 Get the number of ITeam's in the schedule. More...

HRESULT getNumOfGames ([out, retval] long *plNum)
 Get the number of IGame's in the schedule. More...

HRESULT getNumOfScheduledGames ([out, retval] long *plNum)
 Get the number of scheduled IGame's in the schedule. More...

HRESULT getNumOfUnscheduledGames ([out, retval] long *plNum)
 Get the number of unscheduled IGame's in the schedule. More...

HRESULT getNumOfTeamGames ([in] long lTeamID,[out, retval] long *plNum)
 Get the number of team IGame's in the schedule. More...

HRESULT getNumOfVenueGames ([in] long lVenueID,[out, retval] long *plNum)
 Get the number of venue IGame's in the schedule. More...

HRESULT getNumOfOfficialGames ([in] long lOfficialID,[out, retval] long *plNum)
 Get the number of official IGame's in the schedule. More...

HRESULT getTeams ([out, retval] ITeamCollection **ppICollection)
 Get a collection of all the ITeam's in the schedule. More...

HRESULT getVenues ([out, retval] IVenueCollection **ppICollection)
 Get a collection of all the IVenue's used by the tournament. More...

HRESULT getGames ([out, retval] IGameCollection **ppICollection)
 Get a collection of all the IGame's in the schedule. More...

HRESULT getScheduledGames ([out, retval] IGameCollection **ppICollection)
 Get a collection of all the scheduled IGame's in the schedule. More...

HRESULT getUnscheduledGames ([out, retval] IGameCollection **ppICollection)
 Get a collection of all the unscheduled IGame's in the schedule. More...

HRESULT getTeamGames ([in] long lTeamID,[out, retval] IGameCollection **ppICollection)
 Get a collection of all the team's IGame's in the schedule. More...

HRESULT getVenueGames ([in] long lVenueID,[out, retval] IGameCollection **ppICollection)
 Get a collection of all the venue's IGame's in the schedule. More...

HRESULT getOfficialGames ([in] long lOfficialID,[out, retval] IGameCollection **ppICollection)
 Get a collection of all the official's IGame's in the schedule. More...

HRESULT getOfficials ([out, retval] IOfficialCollection **ppICollection)
 Get a collection of all the IOfficial's for the schedule. More...

HRESULT getNumOfOfficials ([out, retval] long *pVal)
 Get the number of IOfficial's for the schedule. More...

HRESULT getHaveGame ([in] long lID,[out, retval] BOOL *fVal)
 Find out whether or not the specified game belongs to this schedule. More...

HRESULT getStandings ([out, retval] IStandings **ppIStandings)
 The IStandings object for the tournament. More...

HRESULT showBracketImage ([in] long lWidth,[in] long lHeight,[in] BSTR sTagOptions,[out, retval] BSTR *pstrTag)
 Saves the bracket graphic to a GIF file with the specified dimensions and outputs a link to the image. More...


Detailed Description

The ITournamentSchedule object.

The ITournamentSchedule object represents a tournament in the project. Use this object to get the games, settings, and other information relavant to the tournament schedule. Do not create this object directly, instead use the getTournamentSchedule() or getTournamentSchedules() methods of the IProject object.

Program ID: TSSSX.TournamentSchedule

Example:

    var eSchedules = new Enumerator(Project.getTournamentSchedules());
    for (; !eSchedules.atEnd(); eSchedules.moveNext())
    {
        oSchedule = eSchedules.item();

        // do something with the ITournamentSchedule object
        Response.WriteLine("There are " + oSchedule.getNumOfGames() + 
            " games in the practice schedule '" + oSchedule.Name + "'");
    }

See also:
IProject


Member Function Documentation

HRESULT ITournamentSchedule::Availability [out, retval] IAvailability **    pVal
 

Get the IAvailabiity object associated with this object.

Example:

    if (obj.Availability.AlwaysAvailable)
    {
        Response.WriteLine("The object " + obj.Name + " is always available for game play.");
    }

HRESULT ITournamentSchedule::EndDate [out, retval] DATE *    pVal
 

Get the EndDate property of this object as a DATE.

Example:

    var end = new Date(schedule.EndDate);
    Response.Write(end);

HRESULT ITournamentSchedule::GameDurationMinutes [out, retval] long *    pVal
 

Get the GameDurationMinutes property of this object as an long.

The GameDurationMinutes property returns the game duration in minutes. If a game is 2 hours, the number of minutes returned would be 120.

Returns:
Returns the number of minutes a game takes to play. Example:
    var iHours,iMinutes;

    iHours = schedule.GameDurationMinutes/60;
    iMinutes = schedule.GameDurationMinutes%60;

    Response.Write("The game duration is " + iHours + " hours, " + iMinutes + " minutes.");

HRESULT ITournamentSchedule::ID [out, retval] long *    pVal
 

Get the ID property of this object as a long.

Example:

    var iID = obj.ID;

HRESULT ITournamentSchedule::MasterScheduleID [out, retval] long *    pVal
 

Get the MasterScheduleID property of this object as a long.

Returns:
Returns the IMasterSchedule's ID associated with this schedule.
Example:
    var masterschedule = Project.getMasterSchedule(schedule.MasterScheduleID);
    if (masterschedule != null)
    {
        // do something with the masterschedule
    }

HRESULT ITournamentSchedule::Name [out, retval] BSTR *    pVal
 

Get the Name property of this object as a String.

Example:

    var sName = obj.Name;

HRESULT ITournamentSchedule::StartDate [out, retval] DATE *    pVal
 

Get the StartDate property of this object as a DATE.

Example:

    var start = new Date(schedule.StartDate);
    Response.Write(start);

HRESULT ITournamentSchedule::ToString [out, retval] BSTR *    pVal
 

Get a String representation of this object.

Example:

    var sImplicit = "The object '" + obj + "' ToString property was called implicitly.";
    var sDirect = "The object '" + obj.ToString + "' ToString property was called directly.";

HRESULT ITournamentSchedule::TournamentType [out, retval] long *    pVal
 

Get the TournamentType property of this object as an long.

There are currently four types of tournaments supported as listed below.
0Single Elimination - Teams play until they lose. After one loss the team is kicked out of the tournament.
1Double Elimination - If a team loses once it falls down to the losers bracket. If it loses again, it is kicked out of the tournament. Teams in the losers bracket still have a chance at the championship round.
2Consolation - If a team loses once it falls down to the consolation bracket. If it loses again, it is kicked out of the tournament. There is a tournament winner from the winning round, and a consolation winner from the losers round.
3Consolation First Round Losers Only - Winners from the first round continue on towards the championships, while losers of the first round continue toward the consolation prize. Teams losing after the first round are kicked out of the tournament.

Returns:
Returns the corresponding value to the types listed above.
Example:
    var sType = "unknown";
    switch (tournament.TournamentType)
    {
        case 0:     // single elim
            sType = "Single Elimination";
            break;
        case 1:     // double elim
            sType = "Double Elimination";
            break;
        case 2:     // consolation
            sType = "Consolation";
            break;
        case 3:     // firstround consolation
            sType = "Consolation First Round Losers";
            break;
    }

    Response.WriteLine("This is a " + sType + " tournament.");

HRESULT ITournamentSchedule::getGames [out,retval] IGameCollection **    ppICollection
 

Get a collection of all the IGame's in the schedule.

Returns:
Returns a IGameCollection of all the IGame's in the schedule.
Example:
    var obj;
    var eItems = new Enumerator(schedule.getGames());
    for (; !eItems.atEnd(); eItems.moveNext())
    {
        obj = eItems.item();
        // do something with the obj
    }
See also:
IGame, IGameCollection

HRESULT ITournamentSchedule::getHaveGame [in] long    lID,
[out,retval] BOOL *    fVal
 

Find out whether or not the specified game belongs to this schedule.

Parameters:
lID  The ID of the game to look up.
Returns:
Returns true if the event is in this schedule, false otherwise.
Example:
    var game;
    var eItems = new Enumerator(Project.getGames());
    for (; !eItems.atEnd(); eItems.moveNext())
    {
        game = eItems.item();
        if (schedule.getHaveGame(game.ID) == true)
        {
            Response.WriteLine("The schedule '" + schedule + "' has the game '" + game + "'");
        }
    }
See also:
IGame

HRESULT ITournamentSchedule::getMasterSchedule [out,retval] IMasterSchedule **    ppIMasterSchedule
 

Get the IMasterSchedule for this schedule.

Returns:
Returns the IMasterSchedule object for this schedule.
Example:
    var schedule = schedule.getMasterSchedule();
    if (schedule != null)
    {
        // do something with the league
    }
See also:
ILeague

HRESULT ITournamentSchedule::getNumOfGames [out,retval] long *    plNum
 

Get the number of IGame's in the schedule.

Returns:
Returns the number of IGame's in the schedule.
Example:
    var iNum = schedule.getNumOfGames();

HRESULT ITournamentSchedule::getNumOfOfficialGames [in] long    lOfficialID,
[out,retval] long *    plNum
 

Get the number of official IGame's in the schedule.

Parameters:
lOfficialID  The IOfficial's ID.
Returns:
Returns the number of official IGame's in the schedule.
Example:
    var iNum = schedule.getNumOfOfficialGames(official.ID);

HRESULT ITournamentSchedule::getNumOfOfficials [out,retval] long *    pVal
 

Get the number of IOfficial's for the schedule.

Returns:
Returns the number of IOfficial's for the schedule.
Example:
    var iNum = schedule.getNumOfOfficials();

HRESULT ITournamentSchedule::getNumOfScheduledGames [out,retval] long *    plNum
 

Get the number of scheduled IGame's in the schedule.

Returns:
Returns the number of scheduled IGame's in the schedule.
Example:
    var iNum = schedule.getNumOfScheduledGames();

HRESULT ITournamentSchedule::getNumOfTeamGames [in] long    lTeamID,
[out,retval] long *    plNum
 

Get the number of team IGame's in the schedule.

Parameters:
lTeamID  The ID of the team you wish to get the number of games for.
Returns:
Returns the number of team IGame's in the schedule.
Example:
    var iNum = schedule.getNumOfTeamGames(team.ID);

HRESULT ITournamentSchedule::getNumOfTeams [out,retval] long *    plNum
 

Get the number of ITeam's in the schedule.

Returns:
Returns the number of ITeam's in the schedule.
Example:
    var iNum = schedule.getNumOfTeams();

HRESULT ITournamentSchedule::getNumOfUnscheduledGames [out,retval] long *    plNum
 

Get the number of unscheduled IGame's in the schedule.

Returns:
Returns the number of unscheduled IGame's in the schedule.
Example:
    var iNum = schedule.getNumOfUnscheduledGames();

HRESULT ITournamentSchedule::getNumOfVenueGames [in] long    lVenueID,
[out,retval] long *    plNum
 

Get the number of venue IGame's in the schedule.

Parameters:
lVenueID  The ID of the venue you wish to get the number of games for.
Returns:
Returns the number of venue IGame's in the schedule.
Example:
    var iNum = schedule.getNumOfVenueGames(venue.ID);

HRESULT ITournamentSchedule::getNumOfVenues [out,retval] long *    plNum
 

Get the number of IVenue's (fields) in use by the tournament.

Returns:
Returns the number of IVenue's in the tournament.
Example:
    var iNum = tournamentschedule.getNumOfVenues();

HRESULT ITournamentSchedule::getOfficialGames [in] long    lOfficialID,
[out,retval] IGameCollection **    ppICollection
 

Get a collection of all the official's IGame's in the schedule.

Parameters:
lID  The IOfficial's ID
Returns:
Returns a IGameCollection of all the official's IGame's in the schedule.
Example:
    var oGame;
    var eGames = new Enumerator(schedule.getOfficialGames(official.ID));
    for (; !eGames.atEnd(); eGames.moveNext())
    {
        oGame = eGames.item();
        // do something with the IGame object
    }
See also:
IGame, IGameCollection, IOfficial

HRESULT ITournamentSchedule::getOfficials [out,retval] IOfficialCollection **    ppICollection
 

Get a collection of all the IOfficial's for the schedule.

Returns:
Returns a IOfficialCollection of all the IOfficial's for the schedule.
Example:
    var obj;
    var eItems = new Enumerator(schedule.getOfficials());
    for (; !eItems.atEnd(); eItems.moveNext())
    {
        obj = eItems.item();
        // do something with the obj
    }
See also:
IOfficial, IOfficialCollection

HRESULT ITournamentSchedule::getScheduledGames [out,retval] IGameCollection **    ppICollection
 

Get a collection of all the scheduled IGame's in the schedule.

Returns:
Returns a IGameCollection of all the scheduled IGame's in the schedule.
Example:
    var obj;
    var eItems = new Enumerator(schedule.getScheduledGames());
    for (; !eItems.atEnd(); eItems.moveNext())
    {
        obj = eItems.item();
        // do something with the obj
    }
See also:
IGame, IGameCollection

HRESULT ITournamentSchedule::getStandings [out, retval] IStandings **    ppIStandings
 

The IStandings object for the tournament.

Returns:
Returns the IStandings object for the tournament.
Example:
    var oStandings = tournament.getStandings();
    var iWins = oStandings.getWins(team.ID);
See also:
IStandings

HRESULT ITournamentSchedule::getTeamGames [in] long    lTeamID,
[out,retval] IGameCollection **    ppICollection
 

Get a collection of all the team's IGame's in the schedule.

Parameters:
lID  The ITeam's ID
Returns:
Returns a IGameCollection of all the team's IGame's in the schedule.
Example:
    var oGame;
    var eGames = new Enumerator(schedule.getTeamGames(team.ID));
    for (; !eGames.atEnd(); eGames.moveNext())
    {
        oGame = eGames.item();
        // do something with the IGame object
    }
See also:
IGame, IGameCollection, ITeam

HRESULT ITournamentSchedule::getTeams [out,retval] ITeamCollection **    ppICollection
 

Get a collection of all the ITeam's in the schedule.

Returns:
Returns a ITeamCollection of all the ITeam's in the schedule.
Example:
    var obj;
    var eItems = new Enumerator(schedule.getTeams());
    for (; !eItems.atEnd(); eItems.moveNext())
    {
        obj = eItems.item();
        // do something with the obj
    }
See also:
ITeam, ITeamCollection

HRESULT ITournamentSchedule::getUnscheduledGames [out,retval] IGameCollection **    ppICollection
 

Get a collection of all the unscheduled IGame's in the schedule.

Returns:
Returns a IGameCollection of all the unscheduled IGame's in the schedule.
Example:
    var obj;
    var eItems = new Enumerator(schedule.getUnscheduledGames());
    for (; !eItems.atEnd(); eItems.moveNext())
    {
        obj = eItems.item();
        // do something with the obj
    }
See also:
IGame, IGameCollection

HRESULT ITournamentSchedule::getVenueGames [in] long    lVenueID,
[out,retval] IGameCollection **    ppICollection
 

Get a collection of all the venue's IGame's in the schedule.

Parameters:
lID  The IVenue's ID
Returns:
Returns a IGameCollection of all the venue's IGame's in the schedule.
Example:
    var oGame;
    var eGames = new Enumerator(schedule.getVenueGames(venue.ID));
    for (; !eGames.atEnd(); eGames.moveNext())
    {
        oGame = eGames.item();
        // do something with the IGame object
    }
See also:
IGame, IGameCollection, IVenue

HRESULT ITournamentSchedule::getVenues [out,retval] IVenueCollection **    ppICollection
 

Get a collection of all the IVenue's used by the tournament.

Returns:
Returns a IVenueCollection of all the IVenue's used by the tournament.
Example:
    var obj;
    var eItems = new Enumerator(tournament.getVenues());
    for (; !eItems.atEnd(); eItems.moveNext())
    {
        obj = eItems.item();
        // do something with the obj
    }
See also:
IVenue, IVenueCollection

HRESULT ITournamentSchedule::showBracketImage [in] long    lWidth,
[in] long    lHeight,
[in] BSTR    sTagOptions,
[out, retval] BSTR *    pstrTag
 

Saves the bracket graphic to a GIF file with the specified dimensions and outputs a link to the image.

This method saves the tournament bracket image to a GIF file with the specified maximum width and height and constructs a HTML <img> tag with the requested options which references the saved image file.

Parameters:
lWidth  The maximum width of the bracket.
lHeight  The maximum height of the bracket image.
sTagOptions  Any additional attributes you would like the <img> tag to contain.
Returns:
Returns an <img> tag referencing the generated graphic file.
Example:
    Response.WriteLine( tournament.showBracketImage(600, 600, "border='0' align='center'");

Result:

    <img src="311001-600-600-tourny.gif" border='0' aligh='center' >


Galactix Home | Main Page | Class Hierarchy | Data Structures | Function List

Copyright © 1996-2007, Galactix Software. All rights reserved.
Questions? Comments? Send email to support@galactix.com