Crystal Space
Welcome, Guest. Please login or register.
September 03, 2014, 06:13:54 am

Login with username, password and session length
Search:     Advanced search
9009 Posts in 2043 Topics by 8379 Members
Latest Member: Hamlock3
* Home Help Search Login Register
+  Crystal Space
|-+  Associate Projects
| |-+  CEL Discussion
| | |-+  LoadPropertyClassFactory can somebody explain me this ?.
« previous next »
Pages: [1] Print
Author Topic: LoadPropertyClassFactory can somebody explain me this ?.  (Read 2741 times)
lib.dll
Guest


Email
« on: April 06, 2006, 06:22:36 pm »

What have to be done to make for example this line work. (non of my LoadPropertyClassFactory is working)
how can i avoid this by using config file ??
Code:

if (!celPL->LoadPropertyClassFactory ("cel.pcfactory.test"))
return false;

also why i have to use  csQueryRegistryTagInterface for my cel stuff and not csQueryRegistry???


Code:
loader=csQueryRegistry<iLoader>(object_reg);
if (!loader) return ReportError("iLoader Query failed");

celPL=csQueryRegistryTagInterface<iCelPlLayer>(object_reg,"iCelLayer.Tag");
if (!celPL) return ReportError("iCelPlLayer Query failed");

celBL=csQueryRegistryTagInterface<iCelBlLayer>(object_reg,"iCelBlLayer.Tag");
if (!celBL) return ReportError("iCelBlLayer Query failed");
celPL->RegisterBehaviourLayer(celBL);


Logged
jorrit
Administrator
Hero Member
*****
Posts: 1706


View Profile
« Reply #1 on: April 06, 2006, 07:38:06 pm »

Why doesn't that LoadPropertyClassFactory() work? What happens if you try?

csQueryRegistryTagInterface is needed if the object is in the object registry with another tag then the 'interface' tag. This seems to be the case in your example.

Greetings,
Logged
lib.dll
Guest


Email
« Reply #2 on: April 06, 2006, 08:04:13 pm »

ok i changed to

      celPL=csQueryRegistry<iCelPlLayer>(object_reg);
      if (!celPL) return ReportError("iCelPlLayer Query failed");

      celBL=csQueryRegistry<iCelBlLayer>(object_reg);
      if (!celBL) return ReportError("iCelBlLayer Query failed");



btw. waht is  this "tag"  for ??
Logged
Vincent
Full Member
***
Posts: 191


View Profile WWW
« Reply #3 on: June 05, 2006, 08:16:26 pm »

Tagged property classes are useful when you want multiple pc of the same type attached to your entity.
Let's say you want your player's entity to have an inventory for weapons and another one for potions,
tags permit to easily select the one you want to operate on.
Note you can have one non-tagged pc, and multiple tagged ones...
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 5.788 seconds with 16 queries.