Jump to content

  • Log In with Google      Sign In   
  • Create Account


- - - - -

asIScriptModule == asIScriptModule


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 ccvca   Members   -  Reputation: 112

Like
0Likes
Like

Posted 14 February 2014 - 08:23 AM

Hi,

 

I want to compare if a asIScriptFunction* containes to a stored module.

//c++
asIScriptModule *myModule;


void setCallback(asIScriptFunction * func){
   //compare if func contains to the module myModule
   
   // bad way
   if(std::string(func->getModule()->getName()) == myModule->getName()){
      
   } 

   ///... do something else
}

//AngelScript

void callback(){
   //some code
}

void main(){
   setCallback(@callback);

}

Using the name of the module is possible, but it's not a fast solution.

Is there any 'ID' like the Index in "asIScriptEngine::GetModuleByIndex()" stored inside a module?

 

Thanks for every answer
ccvca


Edited by ccvca, 14 February 2014 - 08:24 AM.


Sponsor:

#2 Andreas Jonsson   Moderators   -  Reputation: 3290

Like
1Likes
Like

Posted 14 February 2014 - 10:01 AM

You can compare the asIScriptModule pointers directly. There is no need for an additional id.


AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

#3 ccvca   Members   -  Reputation: 112

Like
0Likes
Like

Posted 14 February 2014 - 10:25 AM

You can compare the asIScriptModule pointers directly. There is no need for an additional id.

Thank you. That's all I need to know.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS