Calling Functions and Prefixes

Basically, I’m a little bit confused on how inheritance works in Lua. For example:


function SWEP:PrimaryAttack()

    self:SetNextPrimaryFire( CurTime() + 0.1 )

Why is the function PrimaryAttack() defined with the prefix “SWEP:” while the function SetNextPrimaryFire() is called with prefix self:?
Isn’t SetNextPrimaryFire also an inherited function?

[editline]5th July 2013[/editline]

Also, I cannot find where SetNextPrimaryFire is actually defined, even in the base weapon code. Does anyone know where it is?