interface TODO: If the typeId ever encodes the const flag, then the isConst parameter should be removed
| 2804 | // interface |
| 2805 | // TODO: If the typeId ever encodes the const flag, then the isConst parameter should be removed |
| 2806 | int asCScriptEngine::GetGlobalPropertyByIndex(asUINT index, const char **name, const char **nameSpace, int *typeId, bool *isConst, const char **configGroup, void **pointer, asDWORD *accessMask) const |
| 2807 | { |
| 2808 | const asCGlobalProperty *prop = registeredGlobalProps.Get(index); |
| 2809 | if( !prop ) |
| 2810 | return asINVALID_ARG; |
| 2811 | |
| 2812 | if( name ) *name = prop->name.AddressOf(); |
| 2813 | if( nameSpace ) *nameSpace = prop->nameSpace->name.AddressOf(); |
| 2814 | if( typeId ) *typeId = GetTypeIdFromDataType(prop->type); |
| 2815 | if( isConst ) *isConst = prop->type.IsReadOnly(); |
| 2816 | if( pointer ) *pointer = prop->GetRegisteredAddress(); |
| 2817 | if( accessMask ) *accessMask = prop->accessMask; |
| 2818 | |
| 2819 | if( configGroup ) |
| 2820 | { |
| 2821 | asCConfigGroup *group = FindConfigGroupForGlobalVar(index); |
| 2822 | if( group ) |
| 2823 | *configGroup = group->groupName.AddressOf(); |
| 2824 | else |
| 2825 | *configGroup = 0; |
| 2826 | } |
| 2827 | |
| 2828 | return asSUCCESS; |
| 2829 | } |
| 2830 | |
| 2831 | // interface |
| 2832 | int asCScriptEngine::GetGlobalPropertyIndexByName(const char *in_name) const |