VR-Forces 4.2 Class Documentation
Waypoint Parameter Entry

This DtWaypointParametersBuilder creates the entry for the waypoint object


Header file:

/*******************************************************************************
** Copyright (c) 2004 MAK Technologies, Inc.
** All rights reserved.
*******************************************************************************/
/*******************************************************************************
** $RCSfile: waypointParametersBuilder.h,v $ $Revision: 1.2 $ $State: Exp $
*******************************************************************************/
#ifndef DtWaypointParametersBuilder_H_
#define DtWaypointParametersBuilder_H_
//class DtWaypointParametersBuilder:
//
//Instances of DtWaypointParametersBuilder are used to create and configure a
//DtVrfObjectParameters object for a waypoint. The parameters object returned
//should fully specify the necessary parameters to create a waypoint.
{
public:
//default constructor
//destructor
//Creates and configures parameters for a waypoint.
protected:
//copy constructor - not implemented
//assignment operator - not implemented
};
#endif

Implementation:

/*******************************************************************************
** Copyright (c) 2004 MAK Technologies, Inc.
** All rights reserved.
*******************************************************************************/
/*******************************************************************************
** $RCSfile: waypointParametersBuilder.cxx,v $ $Revision: 1.4 $ $State: Exp $
*******************************************************************************/
#include <vlutil/vlPrint.h>
#include <vlpi/disEnums.h>
#include <vrfExtProtocol/objTypeEnums.h>
{
}
{
}
{
//Waypoints (and control/overlay objects in general) only need to be
//have a base DtVrfObjectParameters parameters type.
DtVrfObjectParameters* parameters = new DtVrfObjectParameters("vrf-object-param");
if(!parameters)
{
DtWarn("DtParameterDbEntryFactory::createWaypoint() : Can't create parameters.\n"
"No parameters for factory key vrf-object-param.\n");
return NULL;
}
parameters->init();
//Set the state repository user extention and type (required). For this example,
//just create the default (we're not extending the state repository in any
//special way).
DtVrfStateRepositoryUserExtension stateRepositoryUserExtension(0);
parameters->setStateRepositoryUserExtension(stateRepositoryUserExtension);
//By default, we use an extended DtEntityType in our represention of
//waypoint object type in VR-Forces.
//See objTypeEnums.h for the complete set of extended types.
DtRwObjectType objectType("object-type",
DtObjectTypeIndividual,
DtPointObjectKind,
-1,
-1,
-1,
-1,
-1,
-1);
parameters->setObjectType(objectType);
parameters->setForceType(DtForceOther);
parameters->setCategory("Point");
parameters->setEchelonLevel("");
parameters->setOrganized(false);
//Set up local and remote sub component types for the entry. These types
//are used to direct what kinds of state repositories and network interfaces
//should be created for local and remote objects of this kind ('local'
//means simulated within our VR-Forces back-end and 'remote' means
//simulated from some other application, which may or may not be a VR-Forces
//back-end).
local->setSimStateRepositoryType("vrf-overlay-object-state-repository");
local->setNetworkInterfaceType("local-environmental-net-interface");
remote->setSimStateRepositoryType("vrf-moving-object-state-repository");
remote->setNetworkInterfaceType("vrf-remote-environmental-net-interface");
return parameters;
}

Document ID: Generated on Sun Nov 24 19:49:21 EST 2013 from SVN revision 133924
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)