私はC ++の初心者です。次のスニペットを検討してください。
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:
...
};
行は何をマークしますか??? 行う?EntryKeyBase から継承する構造体を宣言していることは理解していますが、「:」に続くものは理解できません。この構文は実際には何を意味するのでしょうか? ありがとう!