Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
Compare
Choose a tag to compare
Loading
@github-actionsgithub-actions released this 13 May 06:04

New

  • (#11) A bunch of new methods were added to the Field and Method classes to have more control when instances are stored in void* variables.
    • Field::getUnsafe<>(void [const]* instance)
    • Field::setUnsafe<>(void [const]* instance, Value value)
    • Field::setUnsafe(void [const]* instance, void const* valuePtr, size_t valueSize)
    • Field::getPtrUnsafe(void [const]* instance)
    • Field::getConstPtrUnsafe(void [const]* instance)
    • Method::invokeUnsafe(void [const]* caller, ArgTypes&&... args)
    • Method::checkedInvokeUnsafe(void [const]* caller, ArgTypes&&... args)

Since the static and dynamic archetypes of provided instances is unknown, no pointer adjustment can be performed explaining the "unsafe" naming, but it is nearly always safe as long as instances do not use multiple inheritance.

Updates

  • TheInvalidCaller exception was renamedInvalidArchetype
  • Since unsafe methods have been added to Field and Method classes, all originally available methods are now completely safe and require the provided instance to be reflected and implement both the static staticGetArchetype method and override the virtual getArchetype method inherited from rfk::Object. If the provided instance has an invalid type to access the field / call the method, theInvalidArchetype exception is thrown.
    • Field::get<>
    • Field::set<>
    • Field::set
    • Field::getPtr
    • Field::getConstPtr
    • Method::invoke
    • Method::checkedInvoke

Therfk::Object inheritance requirement is heavy so I'm thinking about a way to tell the generator to generate the getArchetype base definition / override if the parsed class is or inherits from any of a user-customizable set of classes.

  • TypeTemplateArgument class now stores a Type instead of an Archetype.

Fixes

  • Field class methods now correctly perform the instance pointer adjustment when necessary.
Assets5
Loading

[8]ページ先頭

©2009-2025 Movatter.jp