Panda3D
Loading...
Searching...
No Matches
DistributedObject Class Reference
Inheritance diagram for DistributedObject:
DistributedObjectBase DirectObject DistributedLargeBlobSender DistributedCamera DistributedNode DistributedObjectGlobal SampleObject TimeManager DistributedActor DistributedCartesianGrid DistributedSmoothNode

Public Member Functions

 __init__ (self, cr)
 
 addInterest (self, zoneId, note="", event=None)
 
 announceGenerate (self)
 
 b_setLocation (self, parentId, zoneId)
 
 d_setLocation (self, parentId, zoneId)
 
 delete (self)
 
 deleteOrDelay (self)
 
 disable (self)
 
 disableAndAnnounce (self)
 
 disableAnnounceAndDelete (self)
 
 doCallbackContext (self, context, args)
 
 doneBarrier (self, name=None)
 
 execCommand (self, string, mwMgrId, avId, zoneId)
 
 flushCachedData (self, name)
 
 generate (self)
 
 generateInit (self)
 
 getAutoInterests (self)
 
 getBarrierData (self)
 
 getCacheable (self)
 
 getCachedData (self, name)
 
 getCallback (self, context)
 
 getCallbackArgs (self, context)
 
 getCallbackContext (self, callback, extraArgs=[])
 
 getCurrentContexts (self)
 
 getDelayDeleteCount (self)
 
 getDelayDeleteEvent (self)
 
 getDisableEvent (self)
 
 getDoId (self)
 
 getLocation (self)
 
 getNeverDisable (self)
 
 getParentObj (self)
 
 hasCachedData (self, name)
 
 isDisabled (self)
 
 isGenerated (self)
 
 isGridParent (self)
 
 isLocal (self)
 
 postGenerateMessage (self)
 
 removeInterest (self, handle, event=None)
 
 sendDeleteMsg (self)
 
 sendDisableMsg (self)
 
 sendUpdate (self, fieldName, args=[], sendToId=None)
 
 setBarrierData (self, data)
 
 setCacheable (self, bool)
 
 setCachedData (self, name, data)
 
 setLocation (self, parentId, zoneId)
 
 setNeverDisable (self, bool)
 
 status (self, indent=0)
 
 taskName (self, taskString)
 
 uniqueName (self, idString)
 
 updateAllRequiredFields (self, dclass, di)
 
 updateRequiredFields (self, dclass, di)
 
 updateRequiredOtherFields (self, dclass, di)
 
- Public Member Functions inherited from DistributedObjectBase
 __init__ (self, cr)
 
 handleChildArrive (self, childObj, zoneId)
 
 handleChildArriveZone (self, childObj, zoneId)
 
 handleChildLeave (self, childObj, zoneId)
 
 handleChildLeaveZone (self, childObj, zoneId)
 
 handleQueryObjectChildrenLocalDone (self, context)
 
 hasParentingRules (self)
 
- Public Member Functions inherited from DirectObject
 __init__ (self)
 
 accept (self, event, method, extraArgs=[])
 
 acceptOnce (self, event, method, extraArgs=[])
 
 addTask (self, *args, **kwargs)
 
 detectLeaks (self)
 
 doMethodLater (self, *args, **kwargs)
 
 getAllAccepting (self)
 
 ignore (self, event)
 
 ignoreAll (self)
 
 isAccepting (self, event)
 
 isIgnoring (self, event)
 
 removeAllTasks (self)
 
 removeTask (self, taskOrName)
 

Public Attributes

 activeState = ESNew
 
 autoInterests = autoInterests
 
 cacheable = ESGenerated:
 
 dclass = None
 
 destroyDoStackTrace
 
int DistributedObject_deleted = 1
 
int DistributedObject_initialized = 1
 
- Public Attributes inherited from DistributedObjectBase
 cr = cr
 
 doId
 
int parentId = None
 
 zoneId = None
 

Static Public Attributes

int neverDisable = 0
 
- Static Public Attributes inherited from DistributedObjectBase
 notify = directNotify.newCategory("DistributedObjectBase")
 
- Static Public Attributes inherited from DirectObject
 accept_once = acceptOnce
 
 add_task = addTask
 
 detect_leaks = detectLeaks
 
 do_method_later = doMethodLater
 
 get_all_accepting = getAllAccepting
 
 ignore_all = ignoreAll
 
 is_accepting = isAccepting
 
 is_ignoring = isIgnoring
 
 remove_all_tasks = removeAllTasks
 
 remove_task = removeTask
 

Protected Member Functions

 _deactivateDO (self)
 
 _destroyDO (self)
 
 _retrieveCachedData (self)
 
- Protected Member Functions inherited from DirectObject
 _addTask (self, task)
 
 _clearTask (self, task)
 

Protected Attributes

 _cachedData = self.cr.doDataCache.popCachedData(self.doId)
 
int _delayDeleted = 0
 
bool _delayDeleteForceAllow = False
 
dict _token2delayDeleteName = {}
 
- Protected Attributes inherited from DirectObject
dict _taskList = {}
 

Detailed Description

The Distributed Object class is the base class for all network based
(i.e. distributed) objects.  These will usually (always?) have a
dclass entry in a \\*.dc file.

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
cr )

Member Function Documentation

◆ _deactivateDO()

_deactivateDO ( self)
protected

◆ _destroyDO()

_destroyDO ( self)
protected

◆ _retrieveCachedData()

_retrieveCachedData ( self)
protected

◆ addInterest()

addInterest ( self,
zoneId,
note = "",
event = None )

◆ announceGenerate()

announceGenerate ( self)
Sends a message to the world after the object has been
generated and all of its required fields filled in.

Reimplemented in DistributedLargeBlobSender, and TimeManager.

◆ b_setLocation()

b_setLocation ( self,
parentId,
zoneId )

◆ d_setLocation()

d_setLocation ( self,
parentId,
zoneId )

◆ delete()

delete ( self)
Inheritors should redefine this to take appropriate action on delete

Reimplemented from DistributedObjectBase.

Reimplemented in DistributedActor, DistributedCartesianGrid, DistributedNode, DistributedSmoothNode, and TimeManager.

◆ deleteOrDelay()

deleteOrDelay ( self)

◆ disable()

disable ( self)
Inheritors should redefine this to take appropriate action on disable

Reimplemented in DistributedActor, DistributedCamera, DistributedCartesianGrid, DistributedNode, DistributedSmoothNode, and TimeManager.

◆ disableAndAnnounce()

disableAndAnnounce ( self)
Inheritors should *not* redefine this function.

◆ disableAnnounceAndDelete()

disableAnnounceAndDelete ( self)

◆ doCallbackContext()

doCallbackContext ( self,
context,
args )

◆ doneBarrier()

doneBarrier ( self,
name = None )

◆ execCommand()

execCommand ( self,
string,
mwMgrId,
avId,
zoneId )

◆ flushCachedData()

flushCachedData ( self,
name )

◆ generate()

generate ( self)
Inheritors should redefine this to take appropriate action on generate

Reimplemented in DistributedLargeBlobSender, DistributedCartesianGrid, DistributedNode, DistributedSmoothNode, and TimeManager.

◆ generateInit()

generateInit ( self)
This method is called when the DistributedObject is first introduced
to the world... Not when it is pulled from the cache.

◆ getAutoInterests()

getAutoInterests ( self)

◆ getBarrierData()

getBarrierData ( self)

◆ getCacheable()

getCacheable ( self)

◆ getCachedData()

getCachedData ( self,
name )

◆ getCallback()

getCallback ( self,
context )

◆ getCallbackArgs()

getCallbackArgs ( self,
context )

◆ getCallbackContext()

getCallbackContext ( self,
callback,
extraArgs = [] )

◆ getCurrentContexts()

getCurrentContexts ( self)

◆ getDelayDeleteCount()

getDelayDeleteCount ( self)

◆ getDelayDeleteEvent()

getDelayDeleteEvent ( self)

◆ getDisableEvent()

getDisableEvent ( self)

◆ getDoId()

getDoId ( self)
Return the distributed object id

◆ getLocation()

getLocation ( self)

Reimplemented from DistributedObjectBase.

◆ getNeverDisable()

getNeverDisable ( self)

◆ getParentObj()

getParentObj ( self)

Reimplemented from DistributedObjectBase.

◆ hasCachedData()

hasCachedData ( self,
name )

◆ isDisabled()

isDisabled ( self)
Returns true if the object has been disabled and/or deleted,
or if it is brand new and hasn't yet been generated.

◆ isGenerated()

isGenerated ( self)
Returns true if the object has been fully generated by now,
and not yet disabled.

◆ isGridParent()

isGridParent ( self)

Reimplemented in DistributedCartesianGrid.

◆ isLocal()

isLocal ( self)

◆ postGenerateMessage()

postGenerateMessage ( self)

◆ removeInterest()

removeInterest ( self,
handle,
event = None )

◆ sendDeleteMsg()

sendDeleteMsg ( self)

◆ sendDisableMsg()

sendDisableMsg ( self)

◆ sendUpdate()

sendUpdate ( self,
fieldName,
args = [],
sendToId = None )

◆ setBarrierData()

setBarrierData ( self,
data )

◆ setCacheable()

setCacheable ( self,
bool )

◆ setCachedData()

setCachedData ( self,
name,
data )

◆ setLocation()

setLocation ( self,
parentId,
zoneId )

Reimplemented in DistributedNode.

◆ setNeverDisable()

setNeverDisable ( self,
bool )

◆ status()

status ( self,
indent = 0 )
print out "doId(parentId, zoneId) className
    and conditionally show generated, disabled, neverDisable,
    or cachable"

Reimplemented from DistributedObjectBase.

◆ taskName()

taskName ( self,
taskString )

◆ uniqueName()

uniqueName ( self,
idString )

◆ updateAllRequiredFields()

updateAllRequiredFields ( self,
dclass,
di )

◆ updateRequiredFields()

updateRequiredFields ( self,
dclass,
di )

◆ updateRequiredOtherFields()

updateRequiredOtherFields ( self,
dclass,
di )

Member Data Documentation

◆ _cachedData

_cachedData = self.cr.doDataCache.popCachedData(self.doId)
protected

◆ _delayDeleted

int _delayDeleted = 0
protected

◆ _delayDeleteForceAllow

bool _delayDeleteForceAllow = False
protected

◆ _token2delayDeleteName

_token2delayDeleteName = {}
protected

◆ activeState

activeState = ESNew

◆ autoInterests

autoInterests = autoInterests

◆ cacheable

cacheable = ESGenerated:

◆ dclass

dclass = None

◆ destroyDoStackTrace

destroyDoStackTrace

◆ DistributedObject_deleted

int DistributedObject_deleted = 1

◆ DistributedObject_initialized

int DistributedObject_initialized = 1

◆ neverDisable

int neverDisable = 0
static