I'm newbie in c++, consider the following snippet:
class myClass
{
...
struct EntryKeyBase
{
void setOperation(OpType oper)
{
operation = oper;
}
OpType getOperation() const
{
return operation;
}
virtual void serialize(std::ostream& os) const = 0;
protected:
OpType operation;
};
struct ProtoEntryKey: EntryKeyBase
{
// some methods here
ProtoEntryKey(uint8_t l4proto) : proto(l4proto) // ???
{
operation = Inserted;
}
protected:
uint8_t proto;
};
// here more structs defined...
public:
...
};
What does the line marked ??? do? I understand that we declare structure inheriting from EntryKeyBase, but whatever follows ':' I don't understand, what does this syntax really mean? Thanks!