Gorgon Game Engine
InstanceMember Class Referenceabstract

This class represents an instance data member. More...

Inheritance diagram for InstanceMember:
[legend]

Public Member Functions

 InstanceMember (const std::string &name, const std::string &help, const Type &type, bool constant=false, bool ref=false, bool readonly=false)
 Constructor. More...
 
virtual ~InstanceMember ()
 
Data Get (Data &source) const
 Gets data from the datamember. More...
 
const TypeGetType () const
 Returns the type of this data member. More...
 
bool IsConstant () const
 Returns whether this member is a constant. More...
 
virtual bool IsInstanceMember () const override final
 Returns if this member is an instance member. More...
 
bool IsReadonly () const
 Returns whether this member is read-only. More...
 
bool IsReference () const
 Returns whether this member is a reference. More...
 
void Set (Data &source, Data &value) const
 Sets the data of the data member, if the source is a reference, this function should perform in place replacement of the value. More...
 
- Public Member Functions inherited from Member
 Member (const std::string &name, const std::string &help)
 
virtual ~Member ()
 
std::string GetHelp () const
 Returns the help string. Help strings may contain markdown notation. More...
 
std::string GetName () const
 Returns the name of this member. More...
 
const MemberGetOwner () const
 
std::string GetQualifiedName () const
 Returns the namespace qualified name of this member. More...
 

Protected Member Functions

virtual Data get (Data &source) const =0
 This function should return the value of this member. More...
 
virtual void set (Data &source, Data &value) const =0
 This function should perform set operation. More...
 
virtual void typecheck (const Type *type) const =0
 Type checks the parent. More...
 
- Protected Member Functions inherited from Member
virtual void SetParent (const Member &parent)
 Changes the parent of the member. More...
 

Protected Attributes

bool constant
 This instance member is a constant. More...
 
bool readonly
 Marks this instance as read-only. More...
 
bool reference
 This instance member is a reference. More...
 
const Typetype
 Type of the datamember. More...
 
- Protected Attributes inherited from Member
std::string help
 Help string of the datamember. More...
 
std::string name
 The name of the datamember. More...
 
const Memberparent
 

Detailed Description

This class represents an instance data member.

Constructor & Destructor Documentation

◆ InstanceMember()

InstanceMember ( const std::string &  name,
const std::string &  help,
const Type type,
bool  constant = false,
bool  ref = false,
bool  readonly = false 
)

Constructor.

◆ ~InstanceMember()

virtual ~InstanceMember ( )
virtual

Member Function Documentation

◆ Get()

◆ get()

virtual Data get ( Data source) const
protectedpure virtual

This function should return the value of this member.

Implemented in MappedROInstanceMember_Function, and MappedROInstanceMember< C_, T_ >.

◆ GetType()

const Type& GetType ( ) const

Returns the type of this data member.

References InstanceMember::type.

◆ IsConstant()

bool IsConstant ( ) const

Returns whether this member is a constant.

References InstanceMember::constant.

◆ IsInstanceMember()

virtual bool IsInstanceMember ( ) const
finaloverridevirtual

Returns if this member is an instance member.

Implements Member.

◆ IsReadonly()

bool IsReadonly ( ) const

Returns whether this member is read-only.

Read-only members cannot be assigned to, however, their state can be altered using its data members or functions.

References InstanceMember::readonly.

◆ IsReference()

bool IsReference ( ) const

Returns whether this member is a reference.

References InstanceMember::reference.

◆ Set()

void Set ( Data source,
Data value 
) const

Sets the data of the data member, if the source is a reference, this function should perform in place replacement of the value.

References Member::name, InstanceMember::readonly, and InstanceMember::set().

◆ set()

virtual void set ( Data source,
Data value 
) const
protectedpure virtual

◆ typecheck()

virtual void typecheck ( const Type type) const
protectedpure virtual

Member Data Documentation

◆ constant

bool constant
protected

This instance member is a constant.

◆ readonly

bool readonly
protected

Marks this instance as read-only.

◆ reference

bool reference
protected

This instance member is a reference.

◆ type

const Type* type
protected

Type of the datamember.


The documentation for this class was generated from the following file: