VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
makVrf::DtVrfCopyPasteHandler Class Referenceabstract

The Master DtVrfCopyPasteManagerHandler.

Inheritance diagram for makVrf::DtVrfCopyPasteHandler:
Inheritance graph
[legend]

Public Types

typedef std::pair< std::string,
int
PasteInformation
 
typedef std::map< std::string,
std::vector< PasteInformation > > 
PasteData
 
typedef std::map< DtCopyObject
*, int
ObjectsCopying
 
typedef std::vector
< DtCopyObject * > 
ObjectsDeleting
 
typedef std::vector
< DtCopyObject * > 
ObjectsPasting
 

Public Member Functions

 DtVrfCopyPasteHandler (makVrv::DtDe &)
 
virtual ~DtVrfCopyPasteHandler ()
 
const PasteDatapasteData () const
 
virtual int numberOfObjectsInPasteData () const
 
virtual void clearPasteData ()
 
virtual void copy (const makVrv::DtUniqueID &id)
 
virtual bool canCopy () const
 
int numCopying () const
 
virtual bool canPaste () const
 
virtual void stop ()
 
virtual void cancelPaste ()
 
virtual void cancelled (DtCopyObject *)
 
virtual void copied (DtCopyObject *, const std::string &)
 
virtual void tick ()
 
virtual void copyOperationPending (DtCopyObject *, const std::string &)
 
virtual DtCopyObjectcreateCopyObject (const makVrv::DtElementEntry &) const
 
virtual DtCopyObjectcreateCopyObject (int type) const =0
 
void setPasteFlags (int f)
 
int pasteFlags () const
 
bool hasObjectsToPaste () const
 
virtual void setPreserveOffsets (bool)
 
virtual bool preserveOffsets () const
 
virtual void paste (const DtVector &at=DtVector(), int flags=DtCopyObject::DtAllPasteFlags)
 
bool pasting () const
 
void setMaximumToProcessInPastePass (int i)
 
int maximumToProcessInPastePass () const
 
virtual void cleanup ()
 
virtual DtCopyObjectcreateObjectFromPasteData (int type, const std::string &buffer) const
 
virtual void queueObjectsToPaste ()
 
virtual void slot_onPaste ()
 
const ObjectsPastingobjectsPasting () const
 
virtual void setPasteData (const std::string &name, int type, const std::string &pasteBuffer)
 
virtual void registerName (const DtString &)
 
virtual bool nameIsRegistered (const DtString &) const
 

Public Attributes

boost::signals2::signal< void(bool)> signal_hasPasteData
 
boost::signals2::signal< void()> signal_stopped
 
boost::signals2::signal< void(DtCopyObject *)> signal_copyCancelled
 
boost::signals2::signal< void(DtCopyObject
*, const std::string &)> 
signal_copied
 
boost::signals2::signal< void()> signal_copyComplete
 
boost::signals2::signal< void(DtCopyObject
*, const std::string &)> 
signal_copyOperationPending
 
boost::signals2::signal< void()> signal_pasting
 
boost::signals2::signal< void()> signal_pasteComplete
 
boost::signals2::signal< void(DtCopyObject *)> signal_pasted
 
boost::signals2::signal< void(DtCopyObject *)> signal_pasteCancelled
 
boost::signals2::signal< void(DtCopyObject
*, const std::string &)> 
signal_pasteOperationPending
 

Protected Member Functions

virtual void pasted (DtCopyObject *)
 
virtual void removeFromCopying (DtCopyObject *)
 
virtual void cleanupEventProcessor ()
 
virtual void slot_onLocationChanged (const DtVector &, double)
 
virtual void pasteOperationPending (DtCopyObject *, const std::string &)
 
virtual void pasteCancelled (DtCopyObject *)
 
virtual void removeFromBeingPasted (DtCopyObject *)
 

Protected Attributes

makVrv::DtDemyDe
 
PasteData myPasteData
 
ObjectsCopying myObjectsCopying
 
ObjectsPasting myObjectsPasting
 
ObjectsPasting myObjectsBeingPasted
 
ObjectsPasting myObjectsToPaste
 
ObjectsDeleting myToDelete
 
DtVrfObjectManipulationEventProcessormyEventProcessor
 
int myMaximumToProcessInPastePass
 
int myPasteFlags
 
bool myQueueing
 
DtGeodeticCoord myOrigin
 
DtReferenceEllipsoid myReferenceEllipsoid
 
bool myPreserveOffsets
 
std::set< DtStringmyRegisteredNames
 

Member Typedef Documentation

typedef std::pair<std::string, int> makVrf::DtVrfCopyPasteHandler::PasteInformation
typedef std::map<std::string, std::vector<PasteInformation> > makVrf::DtVrfCopyPasteHandler::PasteData

Constructor & Destructor Documentation

makVrf::DtVrfCopyPasteHandler::DtVrfCopyPasteHandler ( makVrv::DtDe )
virtual makVrf::DtVrfCopyPasteHandler::~DtVrfCopyPasteHandler ( )
virtual

Member Function Documentation

const PasteData& makVrf::DtVrfCopyPasteHandler::pasteData ( ) const
inline

Returns the paste data currently in paste buffer.

virtual int makVrf::DtVrfCopyPasteHandler::numberOfObjectsInPasteData ( ) const
virtual

Will iterate over all sub vectors to add their values up. Call this instead of pasteData().size() for an accurate count of objects pasted.

virtual void makVrf::DtVrfCopyPasteHandler::clearPasteData ( )
virtual

Clears out paste data and emits signal that system can no longer paste.

virtual void makVrf::DtVrfCopyPasteHandler::copy ( const makVrv::DtUniqueID id)
virtual

Finds out information about and copies data for the specifie item. Will call routines for specific types (aggregate, environmental, entity)

virtual bool makVrf::DtVrfCopyPasteHandler::canCopy ( ) const
inlinevirtual
int makVrf::DtVrfCopyPasteHandler::numCopying ( ) const
inline
virtual bool makVrf::DtVrfCopyPasteHandler::canPaste ( ) const
inlinevirtual
virtual void makVrf::DtVrfCopyPasteHandler::stop ( )
virtual

Stops any pending copies or pasted and sends out signal for each one stopped, then, final stop signal with 0 as the parameter for what is being cancelled.

virtual void makVrf::DtVrfCopyPasteHandler::cancelPaste ( )
virtual

Cancels paste operation.

virtual void makVrf::DtVrfCopyPasteHandler::cancelled ( DtCopyObject )
virtual

Called when a copy is cancelled. Remove from internal queue and emit signal that item was cancelled. Move object to "toDelete" pile to remove during next de tick.

virtual void makVrf::DtVrfCopyPasteHandler::copied ( DtCopyObject ,
const std::string &   
)
virtual

Called when object has successfully copied. Sends out signal and then adds object to "toDelete" buffer;.

virtual void makVrf::DtVrfCopyPasteHandler::tick ( )
virtual

Called when de ticks, delete any objects in the myToDelete buffer.

virtual void makVrf::DtVrfCopyPasteHandler::copyOperationPending ( DtCopyObject ,
const std::string &   
)
virtual

Reemits copy operation pending signal.

virtual DtCopyObject* makVrf::DtVrfCopyPasteHandler::createCopyObject ( const makVrv::DtElementEntry ) const
virtual

Creates a copy object based on object state (calls createCopyObject(state.type()))

virtual DtCopyObject* makVrf::DtVrfCopyPasteHandler::createCopyObject ( int  type) const
pure virtual

Creates a copy object based on object state. Returns 0 if no creator registered.

Implemented in makVrf::DtVrfCopyPasteManager, and makVrf::DtVrfAggregateCopyPasteHandler.

void makVrf::DtVrfCopyPasteHandler::setPasteFlags ( int  f)
inline
int makVrf::DtVrfCopyPasteHandler::pasteFlags ( ) const
inline
bool makVrf::DtVrfCopyPasteHandler::hasObjectsToPaste ( ) const
inline
virtual void makVrf::DtVrfCopyPasteHandler::setPreserveOffsets ( bool  )
virtual

If true preserve the offsets from a potential aggregate this handler might be part of. Default is false (i.e. respect mouse placement)

virtual bool makVrf::DtVrfCopyPasteHandler::preserveOffsets ( ) const
virtual
virtual void makVrf::DtVrfCopyPasteHandler::paste ( const DtVector &  at = DtVector(),
int  flags = DtCopyObject::DtAllPasteFlags 
)
virtual

Starts paste operation by creating copy objects that will represent information stored in the paste buffer. Will then let the user press the left mouse button to create these objects centered around the clicked position. Right click will stop the paste process. Emits signal_pasting signal.

bool makVrf::DtVrfCopyPasteHandler::pasting ( ) const
inline

Returns true if currently pasting.

void makVrf::DtVrfCopyPasteHandler::setMaximumToProcessInPastePass ( int  i)
inline

Maximum number of objects to try and paste in a single pass. This is to try and prevent network message flooding. Default is 10. -1 means process all.

int makVrf::DtVrfCopyPasteHandler::maximumToProcessInPastePass ( ) const
inline
virtual void makVrf::DtVrfCopyPasteHandler::cleanup ( )
virtual

Cleanup objects to delete.

virtual DtCopyObject* makVrf::DtVrfCopyPasteHandler::createObjectFromPasteData ( int  type,
const std::string &  buffer 
) const
virtual

Creates a copy object and recreates from the paste buffer.

virtual void makVrf::DtVrfCopyPasteHandler::queueObjectsToPaste ( )
virtual

Queues up objects for paste as to the maximum number of objects to paste at a single time.

virtual void makVrf::DtVrfCopyPasteHandler::slot_onPaste ( )
virtual

Pastes all objects centered around the last location changed to.

const ObjectsPasting& makVrf::DtVrfCopyPasteHandler::objectsPasting ( ) const
inline
virtual void makVrf::DtVrfCopyPasteHandler::setPasteData ( const std::string &  name,
int  type,
const std::string &  pasteBuffer 
)
virtual
virtual void makVrf::DtVrfCopyPasteHandler::registerName ( const DtString )
virtual

When pasting objects that depend on a unique name, register the name here and then check on subsequent pastes of other objects to see if the name wanting to be created is registered. Used for scenario events.

virtual bool makVrf::DtVrfCopyPasteHandler::nameIsRegistered ( const DtString ) const
virtual

When pasting objects that depend on a unique name, register the name here and then check on subsequent pastes of other objects to see if the name wanting to be created is registered. Used for scenario events.

virtual void makVrf::DtVrfCopyPasteHandler::pasted ( DtCopyObject )
protectedvirtual

Called when paste operation has completed for this object. Will emit signal that paste operation is complete for this. If all operations are complete, will emit the pasteComplete signal.

virtual void makVrf::DtVrfCopyPasteHandler::removeFromCopying ( DtCopyObject )
protectedvirtual

Removes an object from being copied and places it on the toDelete list. Also hooks up signal to be notified of de tick.

virtual void makVrf::DtVrfCopyPasteHandler::cleanupEventProcessor ( )
protectedvirtual

Called to cleanup the event processor. Called in a tick to make sure that there is not invalid access to the processor.

virtual void makVrf::DtVrfCopyPasteHandler::slot_onLocationChanged ( const DtVector &  ,
double   
)
protectedvirtual

Called for each mouse move, will move all facades to be relative to this new location.

virtual void makVrf::DtVrfCopyPasteHandler::pasteOperationPending ( DtCopyObject ,
const std::string &   
)
protectedvirtual

Called when a paste operation is pending, emits signal_pasteOperationPending.

virtual void makVrf::DtVrfCopyPasteHandler::pasteCancelled ( DtCopyObject )
protectedvirtual

Called when a paste operation is cancelled. Will remove from objectsBeingPasted list, and, if list is empty, signals pasteComplete message.

virtual void makVrf::DtVrfCopyPasteHandler::removeFromBeingPasted ( DtCopyObject )
protectedvirtual

Called from pasted and pasteCancelled, will remove object from being pasted and signal if all paste operations are complete.

Member Data Documentation

boost::signals2::signal<void (bool)> makVrf::DtVrfCopyPasteHandler::signal_hasPasteData

Emitted when state of whether or not can paste has changed.

boost::signals2::signal<void ()> makVrf::DtVrfCopyPasteHandler::signal_stopped
boost::signals2::signal<void (DtCopyObject*)> makVrf::DtVrfCopyPasteHandler::signal_copyCancelled
boost::signals2::signal<void (DtCopyObject*, const std::string&)> makVrf::DtVrfCopyPasteHandler::signal_copied
boost::signals2::signal<void ()> makVrf::DtVrfCopyPasteHandler::signal_copyComplete
boost::signals2::signal<void (DtCopyObject*, const std::string&)> makVrf::DtVrfCopyPasteHandler::signal_copyOperationPending
boost::signals2::signal<void ()> makVrf::DtVrfCopyPasteHandler::signal_pasting
boost::signals2::signal<void ()> makVrf::DtVrfCopyPasteHandler::signal_pasteComplete
boost::signals2::signal<void (DtCopyObject*)> makVrf::DtVrfCopyPasteHandler::signal_pasted
boost::signals2::signal<void (DtCopyObject*)> makVrf::DtVrfCopyPasteHandler::signal_pasteCancelled
boost::signals2::signal<void (DtCopyObject*, const std::string&)> makVrf::DtVrfCopyPasteHandler::signal_pasteOperationPending
makVrv::DtDe& makVrf::DtVrfCopyPasteHandler::myDe
protected
PasteData makVrf::DtVrfCopyPasteHandler::myPasteData
protected

Buffer is a map of object name to data.

ObjectsCopying makVrf::DtVrfCopyPasteHandler::myObjectsCopying
protected
ObjectsPasting makVrf::DtVrfCopyPasteHandler::myObjectsPasting
protected
ObjectsPasting makVrf::DtVrfCopyPasteHandler::myObjectsBeingPasted
protected
ObjectsPasting makVrf::DtVrfCopyPasteHandler::myObjectsToPaste
protected
ObjectsDeleting makVrf::DtVrfCopyPasteHandler::myToDelete
protected
DtVrfObjectManipulationEventProcessor* makVrf::DtVrfCopyPasteHandler::myEventProcessor
protected
int makVrf::DtVrfCopyPasteHandler::myMaximumToProcessInPastePass
protected
int makVrf::DtVrfCopyPasteHandler::myPasteFlags
protected
bool makVrf::DtVrfCopyPasteHandler::myQueueing
protected
DtGeodeticCoord makVrf::DtVrfCopyPasteHandler::myOrigin
protected
DtReferenceEllipsoid makVrf::DtVrfCopyPasteHandler::myReferenceEllipsoid
protected
bool makVrf::DtVrfCopyPasteHandler::myPreserveOffsets
protected
std::set<DtString> makVrf::DtVrfCopyPasteHandler::myRegisteredNames
protected

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

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)