NamedElement* newPoly_NetworkInfo() { NetworkInfo* pNetInfoObj = NULL; NamedElement* pObj = new_NamedElement(); /* Allocating memory */ pNetInfoObj = (NetworkInfo*)malloc(sizeof(NetworkInfo)); if (pNetInfoObj == NULL) { pObj->Delete(pObj); return NULL; } pObj->pDerivedObj = pNetInfoObj; /* Pointing to derived object */ /*pNetInfoObj->values = hashmap_new();*/ pNetInfoObj->values = NULL; pNetInfoObj->AddValues = NetworkInfo_AddValues; pNetInfoObj->RemoveValues = NetworkInfo_RemoveValues; pNetInfoObj->FindValuesByID = NetworkInfo_FindValuesByID; pObj->MetaClassName = NetworkInfo_MetaClassName; pObj->InternalGetKey = NetworkInfo_InternalGetKey; pObj->VisitAttributes = NetworkInfo_VisitAttributes; pObj->VisitReferences = NetworkInfo_VisitReferences; pObj->Delete = deletePoly_NetworkInfo; return pObj; }
NamedElement* newPoly_NetworkProperty() { NetworkProperty* pNetPropObj = NULL; NamedElement* pObj = new_NamedElement(); /* Allocating memory */ pNetPropObj = (NetworkProperty*)malloc(sizeof(NetworkProperty)); if (pNetPropObj == NULL) { pObj->Delete(pObj); return NULL; } pObj->pDerivedObj = pNetPropObj; /* Pointing to derived object */ pNetPropObj->value = NULL; pObj->MetaClassName = NetworkProperty_MetaClassName; pObj->InternalGetKey = NetworkProperty_InternalGetKey; pObj->VisitAttributes = NetworkProperty_VisitAttributes; /*pObj->VisitReferences = NetworkProperty_VisitAttributes;*/ pObj->Delete = deletePoly_NetworkProperty; return pObj; }
//----------------------------------------------------------------------------// void NamedElement::setName(const String& name) { if (d_name == name) return; if (getParentElement()) { NamedElement* parent = dynamic_cast<NamedElement*>(getParentElement()); if (parent && parent->isChild(name)) { CEGUI_THROW(AlreadyExistsException("Failed to rename " "NamedElement at: " + getNamePath() + " as: " + name + ". A Window " "with that name is already attached as a sibling.")); } } // log this under informative level Logger::getSingleton().logEvent("Renamed element at: " + getNamePath() + " as: " + name, Informative); d_name = name; NamedElementEventArgs args(this); onNameChanged(args); }
NamedElement* newPoly_TypeLibrary(void) { TypeLibrary* pTypeLibObj = NULL; NamedElement* pObj = new_NamedElement(); /* Allocating memory */ pTypeLibObj = (TypeLibrary*)malloc(sizeof(TypeLibrary)); if (pTypeLibObj == NULL) { pObj->Delete(pObj); return NULL; } pObj->pDerivedObj = pTypeLibObj; /* Pointing to derived object */ pTypeLibObj->subTypes = NULL; pTypeLibObj->eContainer = NULL; pTypeLibObj->FindSubTypesByID = TypeLibrary_FindSubTypesByID; pTypeLibObj->AddSubTypes = TypeLibrary_AddSubTypes; pTypeLibObj->RemoveSubTypes = TypeLibrary_RemoveSubTypes; pObj->metaClassName = TypeLibrary_metaClassName; pObj->internalGetKey = TypeLibrary_internalGetKey; pObj->Delete = deletePoly_TypeLibrary; pObj->VisitAttributes = TypeLibrary_VisitAttributes; pObj->VisitPathAttributes = TypeLibrary_VisitPathAttributes; pObj->VisitReferences = TypeLibrary_VisitReferences; pObj->VisitPathReferences = TypeLibrary_VisitPathReferences; pObj->FindByPath = TypeLibrary_FindByPath; return pObj; }
NamedElement* newPoly_DeployUnit() { DeployUnit* pDepUnitObj = NULL; NamedElement* pObj = new_NamedElement(); /* Allocating memory */ pDepUnitObj = (DeployUnit*)malloc(sizeof(DeployUnit)); if (pDepUnitObj == NULL) { pObj->Delete(pObj); return NULL; } pObj->pDerivedObj = pDepUnitObj; /* Pointing to derived object */ pDepUnitObj->groupName = NULL; pDepUnitObj->version = NULL; pDepUnitObj->url = NULL; pDepUnitObj->hashcode = NULL; pDepUnitObj->type = NULL; pDepUnitObj->requiredLibs = NULL; pDepUnitObj->eContainer = NULL; pDepUnitObj->internalKey = NULL; pDepUnitObj->AddRequiredLibs = DeployUnit_AddRequiredLibs; pDepUnitObj->RemoveRequiredLibs = DeployUnit_RemoveRequiredLibs; pDepUnitObj->FindRequiredLibsByID = DeployUnit_FindRequiredLibsByID; pObj->metaClassName = DeployUnit_metaClassName; pObj->internalGetKey = DeployUnit_internalGetKey; pObj->VisitAttributes = DeployUnit_VisitAttributes; pObj->VisitPathAttributes = DeployUnit_VisitPathAttributes; pObj->VisitReferences = DeployUnit_VisitReferences; pObj->VisitPathReferences = DeployUnit_VisitPathReferences; pObj->FindByPath = DeployUnit_FindByPath; pObj->Delete = deletePoly_DeployUnit; return pObj; }