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

IGame Interface Reference

The IGame 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 Comment ([out, retval] BSTR *pVal)
 Get the Comment property of this object as a String. More...

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

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

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

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

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

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

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

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

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

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

HRESULT getLeague ([out, retval] ILeague **ppILeague)
 Get the ILeague for this game if it exists. More...

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

HRESULT getVenue ([out, retval] IVenue **ppIVenue)
 Get the IVenue for this game. More...

HRESULT getHomeTeam ([out, retval] ITeam **ppITeam)
 Get the home ITeam for this game. More...

HRESULT getAwayTeam ([out, retval] ITeam **ppITeam)
 Get the away ITeam for this game. More...

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

HRESULT isScheduled ([out, retval] BOOL *pVal)
 Find out if this game has been scheduled. More...

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

HRESULT getPosition ([in] long lOfficialID,[out, retval] BSTR *pVal)
 Get a position of the specified official. More...

HRESULT isBye ([out, retval] BOOL *pVal)
 Returns true if this game is a Bye, false otherwise. More...

HRESULT isOvertime ([out, retval] BOOL *pVal)
 Returns true if this game went into overtime. More...

HRESULT isForfeit ([out, retval] BOOL *pVal)
 Returns true if this game was a forfeit for either home or away team. More...

HRESULT isForfeitHome ([out, retval] BOOL *pVal)
 Returns true if this game was a forfeit for the home team. More...

HRESULT isForfeitAway ([out, retval] BOOL *pVal)
 Returns true if this game was a forfeit for the away team. More...

HRESULT isForfeitWin ([in] long lTeamID,[out, retval] BOOL *pVal)
 Returns true if this game was a forfeit win for the specified team. More...

HRESULT isForfeitLoss ([in] long lTeamID,[out, retval] BOOL *pVal)
 Returns true if this game was a forfeit loss for the specified team. More...

HRESULT includeInStandings ([out, retval] BOOL *pVal)
 Returns true if this game game should be counted in the standings calculation. More...


Detailed Description

The IGame object.

Use the IGame object to get the home and away teams, the type of game, the venue, start time, duration, officials, and other information important to the game. Do not create this object directly, instead use the getGame() or getGames() methods from the IProject, IMasterSchedule, ISeasonSchedule, IPracticeSchedule, or ITournamentSchedule objects.

Program ID: TSSSX.Game

Example:

    var eGames = new Enumerator(masterschedule.getGames());
    for (; !eGames.atEnd(); eGames.moveNext())
    {
        oGame = eGames.item();

        // do something with the IGame object
        theDate = new Date(oGame.StartTime);
        Response.WriteLine(oGame.getHomeTeam().Name + " vs " + 
            oGame.getAwayTeam().Name + " at " + oGame.getVenue().Name +
            " " + theDate);
    }

See also:
IProject, ISeasonSchedule, IPracticeSchedule, ITournamentSchedule


Member Function Documentation

HRESULT IGame::AwayScore [out, retval] int *    pVal
 

Get the AwayScore property of this object as an int.

Returns the away team's score. If the score is equal to -1, it means the score hasn't yet been entered.

Example:

    if (game.HomeScore == -1 || game.AwayScore == -1)
    {
        Response.WriteLine("This game hasn't yet been played.");
    }

HRESULT IGame::AwayTeamID [out, retval] long *    pVal
 

Get the AwayTeamID property of this object as a long.

Returns the away ITeam's ID. The following special ID's are returned when a team hasn't yet been specified or is not yet known (in the case of tournaments).
0Not Specified
-1To Be Decided (TBD)
-2Bye

Example:

    if (game.HomeTeamID == -2 || game.AwayTeamID == -2)
    {
        Response.WriteLine("This game is a Bye...");
    }

HRESULT IGame::Comment [out, retval] BSTR *    pVal
 

Get the Comment property of this object as a String.

Example:

    var sComment = obj.Comment;

HRESULT IGame::EndTime [out, retval] DATE *    pVal
 

Get the EndTime property of this object as a DATE.

Example:

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

HRESULT IGame::GameType [out, retval] int *    pVal
 

Get the GameType property of this object as an int.

Games are broken down into three different types as listed below.
1Season Games
2Practice Games
4Tournament Games

Returns:
Returns the corresponding integer value depending on the type of game.
Example:
    var sType = "unknown";
    switch (game.GameType)
    {
        case 1:     // season games
            sType = "Season";
            break;
        case 2:     // practice games
            sType = "Practice";
            break;
        case 4:     // tournament games
            sType = "Tournament";
            break;
    }

    Response.Write("This game is a " + sType + " game.");

HRESULT IGame::HomeScore [out, retval] int *    pVal
 

Get the HomeScore property of this object as an int.

Returns the home team's score. If the score is equal to -1, it means the score hasn't yet been entered.

Example:

    if (game.HomeScore == -1 || game.AwayScore == -1)
    {
        Response.WriteLine("This game hasn't yet been played.");
    }

HRESULT IGame::HomeTeamID [out, retval] long *    pVal
 

Get the HomeTeamID property of this object as a long.

Returns the home ITeam's ID. The following special ID's are returned when a team hasn't yet been specified or is not yet known (in the case for tournaments).
0Not Specified
-1To Be Decided (TBD)
-2Bye

Example:

    if (game.HomeTeamID == -2 || game.AwayTeamID == -2)
    {
        Response.WriteLine("This game is a Bye...");
    }

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

Get the ID property of this object as a long.

Example:

    var iID = obj.ID;

HRESULT IGame::LeagueID [out, retval] long *    pVal
 

Get the LeagueID property of this object as a long.

Returns:
Returns the ILeague's league ID associated with this game.
Example:
    var league = Project.getLeague(game.LeagueID);
    if (league != null)
    {
        // do something with the league
    }

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

Get the MasterScheduleID property of this object as a long.

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

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

Get the Name property of this object as a String.

Example:

    var sName = obj.Name;

HRESULT IGame::StartTime [out, retval] DATE *    pVal
 

Get the StartTime property of this object as a DATE.

Example:

    var start = new Date(game.StartTime);
    Response.Write(start);

HRESULT IGame::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 IGame::VenueID [out, retval] long *    pVal
 

Get the VenueID property of this object as a long.

Returns:
Returns the IVenue's ID.
Example:
    var venue = Project.getVenue(game.VenueID);
    if (venue != null)
    {
        Response.Write("This game is playing at " + venue.Name);
    }

HRESULT IGame::getAwayTeam [out,retval] ITeam **    ppITeam
 

Get the away ITeam for this game.

Returns:
Returns the away ITeam object for this game.
Example:
    var team = game.getAwayTeam();
    if (team != null)
    {
        // do something with the team
    }
See also:
ITeam

HRESULT IGame::getHomeTeam [out,retval] ITeam **    ppITeam
 

Get the home ITeam for this game.

Returns:
Returns the home ITeam object for this game.
Example:
    var team = game.getHomeTeam();
    if (team != null)
    {
        // do something with the team
    }
See also:
ITeam

HRESULT IGame::getLeague [out,retval] ILeague **    ppILeague
 

Get the ILeague for this game if it exists.

Returns:
Returns the ILeague object associated with this game if the game is a Season or Practice game. null otherwise.
Example:
    var league = game.getLeague();
    if (league != null)
    {
        // do something with the league
    }
See also:
ILeague

HRESULT IGame::getMasterSchedule [out,retval] IMasterSchedule **    ppISchedule
 

Get the IMasterSchedule for this game.

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

HRESULT IGame::getNumOfOfficials [out,retval] long *    plNum
 

Get the number of IOfficial's for the game.

Returns:
Returns the number of IOfficial's officiating during the game.
Example:
    var iNum = game.getNumOfOfficials();

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

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

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

HRESULT IGame::getPosition [in] long    lOfficialID,
[out,retval] BSTR *    pVal
 

Get a position of the specified official.

Parameters:
lOfficialID  The IOfficial's ID you wish to find the position of.
Returns:
Returns the position name of the specified official.
Example:
    Response.Write("The official '" + official.Name + "' will be the " + game.getPosition(official.ID));
See also:
IOfficial, IOfficialCollection

HRESULT IGame::getVenue [out,retval] IVenue **    ppIVenue
 

Get the IVenue for this game.

Returns:
Returns the IVenue object for this game.
Example:
    var venue = game.getVenue();
    if (venue != null)
    {
        // do something with the venue
    }
See also:
IVenue

HRESULT IGame::includeInStandings [out,retval] BOOL *    pVal
 

Returns true if this game game should be counted in the standings calculation.

Parameters:
lTeamID  The ID of the team you want to check for forfeit.
Returns:
Returns true if this game game should be counted in the standings calculation, false otherwise.
Example:
    if (!game.includeInStandings())
        Response.WriteLine("This was a practice game and shouldn't be counted in the standings.");

HRESULT IGame::isBye [out,retval] BOOL *    pVal
 

Returns true if this game is a Bye, false otherwise.

Returns:
Returns true if this game is a Bye.
Example:
    if (game.isBye())
        Response.WriteLine("This game is a bye.");

HRESULT IGame::isForfeit [out,retval] BOOL *    pVal
 

Returns true if this game was a forfeit for either home or away team.

Returns:
Returns true if this game was a forfeit, false otherwise.
Example:
    if (game.isForfeit())
        Response.WriteLine("This game was forfeited.");

HRESULT IGame::isForfeitAway [out,retval] BOOL *    pVal
 

Returns true if this game was a forfeit for the away team.

Returns:
Returns true if this game was a forfeit for the away team, false otherwise.
Example:
    if (game.isForfeitAway())
        Response.WriteLine("The away team forfeited.");

HRESULT IGame::isForfeitHome [out,retval] BOOL *    pVal
 

Returns true if this game was a forfeit for the home team.

Returns:
Returns true if this game was a forfeit for the home team, false otherwise.
Example:
    if (game.isForfeitHome())
        Response.WriteLine("The home team forfeited.");

HRESULT IGame::isForfeitLoss [in] long    lTeamID,
[out,retval] BOOL *    pVal
 

Returns true if this game was a forfeit loss for the specified team.

Parameters:
lTeamID  The ID of the team you want to check for forfeit.
Returns:
Returns true if this game was a forfeit loss for the specified team, false otherwise.
Example:
    if (game.isForfeitLoss(game.getHomeTeam()))
        Response.WriteLine("This was a forfeit loss for the home team.");

HRESULT IGame::isForfeitWin [in] long    lTeamID,
[out,retval] BOOL *    pVal
 

Returns true if this game was a forfeit win for the specified team.

Returns:
Returns true if this game was a forfeit win for the specified team, false otherwise.
Example:
    if (game.isForfeitWin(game.getHomeTeam()))
        Response.WriteLine("This was a forfeit win for the home team.");

HRESULT IGame::isOvertime [out,retval] BOOL *    pVal
 

Returns true if this game went into overtime.

Returns:
Returns true if this game went into overtime, false otherwise.
Example:
    if (game.isOvertime())
        Response.WriteLine("This game went into overtime.");

HRESULT IGame::isScheduled [out,retval] BOOL *    pVal
 

Find out if this game has been scheduled.

Returns:
Returns true if this game has been scheduled, otherwise false.
Example:
    if (game.isScheduled)
    {
        Response.WriteLine("This game has been scheduled.");
    }
    else
    {
        Response.WriteLine("This game has not been scheduled.");
    }


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