Nallowing new Global DC objects that are always in scope

This commit is contained in:
Roger Hughston 2004-07-23 02:19:31 +00:00
parent bfb064b72e
commit 3d952861b5
2 changed files with 26 additions and 0 deletions

View File

@ -181,6 +181,28 @@ class ClientRepository(ConnectionRepository.ConnectionRepository):
# updateRequiredFields calls announceGenerate
return distObj
def generateGlobalObject(self , doId, dcname):
# Look up the dclass
dclass = self.dclassesByName[dcname]
# Create a new distributed object, and put it in the dictionary
#distObj = self.generateWithRequiredFields(dclass, doId, di)
# Construct a new one
classDef = dclass.getClassDef()
if classDef == None:
self.notify.error("Could not create an undefined %s object." % (dclass.getName()))
distObj = classDef(self)
distObj.dclass = dclass
# Assign it an Id
distObj.doId = doId
# Put the new do in the dictionary
self.doId2do[doId] = distObj
# Update the required fields
distObj.generateInit() # Only called when constructed
distObj.generate()
# updateRequiredFields calls announceGenerate
return distObj
def generateWithRequiredOtherFields(self, dclass, doId, di):
if self.doId2do.has_key(doId):
# ...it is in our dictionary.

View File

@ -88,3 +88,7 @@ QUIET_ZONE_IGNORED_LIST = [
CLIENT_LOGIN_2_GREEN = 1 # Disney's GoReg subscription token, not used.
CLIENT_LOGIN_2_PLAY_TOKEN = 2 # VR Studio PlayToken.
CLIENT_LOGIN_2_BLUE = 3 # The international GoReg token.
# Global Object ID 's
GLOBAL_ID_FRIEND_MANAGER= 4501