Commit Graph

67 Commits

Author SHA1 Message Date
Jaroslaw Palczynski
adecd4aaad UHT: Allows defining multiple UCLASSes in one header file.
[CL 2412156 by Jaroslaw Palczynski in Main branch]
2015-01-20 09:33:54 -05:00
Jaroslaw Palczynski
494b01ca46 UHT: Splitting generated CPP files fix.
UECORE-73

[CL 2408543 by Jaroslaw Palczynski in Main branch]
2015-01-16 05:02:48 -05:00
Steve Robb
80c6561731 Fix for GUID calculation on split generated files.
#codereview robert.manuszewski,jaroslaw.palczynski

[CL 2404828 by Steve Robb in Main branch]
2015-01-13 12:24:06 -05:00
John Abercrombie
4e9ac6444a Merging using UE4-Fortnite-To-UE4 @ CL 2382284
[CL 2388856 by John Abercrombie in Main branch]
2014-12-15 15:29:48 -05:00
Mikolaj Sieluzycki
62bcb126ce XBoxOne CIS fix.
[CL 2386109 by Mikolaj Sieluzycki in Main branch]
2014-12-11 16:29:40 -05:00
Mikolaj Sieluzycki
4b1f513db4 Emit warning if GetLifetimeReplicatedProps and functions with _Implementation and _Validate suffixes aren't declared.
#codereview Robert.Manuszewski

[CL 2385673 by Mikolaj Sieluzycki in Main branch]
2014-12-11 11:49:41 -05:00
Robert Manuszewski
a00117eff3 Making sure CRCs generated for UHT-generated code do not change across platforms.
[CL 2385269 by Robert Manuszewski in Main branch]
2014-12-11 04:58:57 -05:00
Mikolaj Sieluzycki
a770062fe2 XBoxOne CIS fix.
#lockdown Ben.Marsh

[CL 2380464 by Mikolaj Sieluzycki in Main branch]
2014-12-08 11:10:43 -05:00
Mikolaj Sieluzycki
70df0c36e9 Don't automatically create function declarations in UHT that user has to implement.
#codereview Steve.Robb

[CL 2380157 by Mikolaj Sieluzycki in Main branch]
2014-12-08 07:30:42 -05:00
Ben Marsh
149375b14b Update copyright notices to 2015.
[CL 2379638 by Ben Marsh in Main branch]
2014-12-07 19:09:38 -05:00
Phillip Kavan
ead8c218f1 [UE-2345] BP - enforce const-correctness in native const class method overrides
this change introduces enforcement of 'const-correctness' into implemented function graphs.

summary:
if you have a function declared in C++ like this:
UFUNCTION(BlueprintImplementableEvent)
int32 MyFunctionThatReturnsSomeValue() const;
if you implement that (BPIE) function in a Blueprint that's parented to that native class, it will now be flagged as 'const'. this makes any properties of 'self' read-only within the context of that graph, which means the compiler will emit an error if you try to set a property or otherwise call a non-const, non-static function with 'self' as the target.
if there happens to already be an implemented const function in a Blueprint that was in place prior to this change, the compiler will emit a warning instead of an error, in order to allow existing Blueprints that may currently be "violating" const within the context of a const BPIE function to still compile, while still alerting to issues that should probably be addressed.
notes:
1) this also applies to BlueprintNativeEvent (BPNE) implementations, and also when implementing BPIE/BPNE interface methods that are also declared as const
2) a const BPIE/BPNE function with no return value and no output parameters will be implemented as a "normal" impure function, and not as an event as in the non-const case
3) a const BPIE/BPNE function with a return value and/or output parameters will currently be implemented as a pure function, regardless of whether or not BlueprintCallable is specified
4) this CL also retains some consolidation of static function validation code that i had previously done, mostly to allow static functions to more easily be whitelisted for const function graphs
#codereview Nick.Whiting, Michael.Noland

[CL 2368059 by Phillip Kavan in Main branch]
2014-11-21 17:47:17 -05:00
Ben Marsh
adcc8663e0 Don't prototype FObjectInitializer in generated code; it prevents Doxygen from matching up the funciton signatures.
[CL 2367847 by Ben Marsh in Main branch]
2014-11-21 15:01:17 -05:00
Robert Manuszewski
01e5f0dc49 Fix for generated code changes (for the Engine) when switching between targets due to uninitialized GeneratedBodyMacroAccessSpecifier member variable.
Added more safety checks and a more detailed error message.

#codereview jaroslaw.palczynski

[CL 2353244 by Robert Manuszewski in Main branch]
2014-11-07 13:17:32 -05:00
Robert Manuszewski
8cb5dea614 Hot-Reload: fixing infinite loop when changing USTRUCTs caused by unnecessary re-initialization of the owner UClass.
UE-4916

#change Replaced CLASS_Temporary (UHT-only flag) with CLASS_Constructed to check if a class needs to be constructed or not in generated code
#change Modified code generator to make sure UClasses don't get reconstructed if not required

[CL 2351525 by Robert Manuszewski in Main branch]
2014-11-06 15:16:05 -05:00
Robert Manuszewski
dcaf3b8fc5 Making sure the compiler does not attempt to generate copy-constructors for UObjects as this produces false warnings when the class contains deprecated members and generally UObjects should not be copy-constructed anyway.
[CL 2345940 by Robert Manuszewski in Main branch]
2014-10-31 04:01:12 -04:00
Robert Manuszewski
a5ced47375 Hot-Reload: fixed hot-reload not detecting UFUNCTION changes in source code
[CL 2344852 by Robert Manuszewski in Main branch]
2014-10-30 09:53:47 -04:00
Jaroslaw Palczynski
7c41927cf4 Rename FPostConstructInitializeProperties to something simpler
Changed it with FObjectInitializer.

UECORE-7

[CL 2328384 by Jaroslaw Palczynski in Main branch]
2014-10-14 10:29:11 -04:00
Jaroslaw Palczynski
399074d7ea DonÆt default to æpublicÆ protection level in classes.
UECORE-8

[CL 2327190 by Jaroslaw Palczynski in Main branch]
2014-10-13 10:31:50 -04:00
Jaroslaw Palczynski
cc0f6d9a4e UObject custom constructors.
In order to use new feature user have to change GENERATED_UCLASS_BODY() macro to the new GENERATED_BODY(). Then no constructor is implicitly declared. If there is no constructor declared in UCLASS then PCIP one is declared and defined that passes PCIP down to super-class. On the other hand if there is a constructor declared then UObject system expects to have one of the default or PCIP constructor to initialize a class during loading from disk, default object creation, etc. and it expects that user will declare and define one.

There is a possibility now to create UCLASS with the default constructor (i.e. no PCIP).

New macro is encouraged by standard classes and in-editor wizards templates.

#codereview Robert.Manuszewski

[CL 2325282 by Jaroslaw Palczynski in Main branch]
2014-10-10 04:34:56 -04:00
Michael Noland
928559eaa0 Editor: Coding-standards fixes (TypeName [*|&] VariableName -> TypeName[*|&] VariableName)
[CL 2316341 by Michael Noland in Main branch]
2014-10-01 14:45:23 -04:00
Mikolaj Sieluzycki
f7729605e0 Disable deprecation warnings in generated code.
#codereview Steve.Robb

[CL 2315678 by Mikolaj Sieluzycki in Main branch]
2014-10-01 05:47:47 -04:00
Steve Robb
04d7d74f86 Minor fixes to new casts.
* InterfaceCast deprecation version number changed to 4.6.
* Double-underscored identifiers replaced with names which aren't reserved.

#codereview robert.manuszewski,mike.fricker

[CL 2314098 by Steve Robb in Main branch]
2014-09-30 07:30:24 -04:00
Steve Robb
35c2fea8c4 Cast unification.
* Cast can be used for every UClass/interface cast:
  - Up/down UObject hierarchy.
  - From interfaces to UObjects.
  - From UObjects to interfaces.
  - Between interfaces.
* InterfaceCast has been deprecated.
* dynamic_cast can now be used instead of Cast.
* dynamic_cast between two UType pointers will be equivalent to Cast, but with dynamic_cast syntax and semantics.
* dynamic_cast of references is equivalent to a CastChecked - if it fails, it will fatally log rather than throw a std::bad_cast exception (UE doesn't support exceptions).
* If the two types involved are not UTypes, it should continue to act like a normal dynamic_cast.
* dynamic_cast<void*> works as expected.
* All/many Casts in CoreUObject changed to dynamic_cast to show this behaviour.
* Some refactoring.

#codereview robert.manuszewski,mike.fricker

[CL 2312800 by Steve Robb in Main branch]
2014-09-29 09:24:50 -04:00
Robert Manuszewski
343352654a UObjects: no longer require dummy UClasses in UStruct-only modules.
#change Added code to make sure the script package is created before UEnums and UStructs get registered

[CL 2306655 by Robert Manuszewski in Main branch]
2014-09-23 05:12:53 -04:00
Josh Adams
4cec25879d - No longer compile Engine.generated.1.cpp and .2.cpp together, as the large resulting code is crashing x86 android compiler.
- Fixed a couple issues with Android fat binaries (cleaning and obb being archived multiple times)
- Touched Engine.h to force a UHT refresh
#codereview Robert.Manuszewski

[CL 2305487 by Josh Adams in Main branch]
2014-09-22 09:46:58 -04:00