How to write replication conditions in c++ code?

well in unrealscript for replications, we use a special block like:

if ( (Role==ROLE_Authority) && bNetDirty && bNetOwner )
	var1, var2;

It seems the AActor::PreReplication function does the replication’s work in UE4 according to the sample code.

However in UE4 ,bNetDirty and bNetOwner are no longer a member of Actor.

So how should I write the code to do the same as if(bNetInitial)/if(beNetDirty) do in the uc replication block?