Gorgon Game Engine
StaticDataMember Class Referenceabstract
Inheritance diagram for StaticDataMember:
[legend]

Public Member Functions

 StaticDataMember (const std::string &name, const std::string &help, const Type *type)
 
 StaticDataMember (const std::string &name, const std::string &help, const Type *type, bool constant, bool ref, bool readonly)
 
template<class ... P_>
 StaticDataMember (const std::string &name, const std::string &help, const Type *type, Tag first, P_ ...rest)
 
virtual Data Get () const override
 Gets data from the datamember. More...
 
virtual MemberType GetMemberType () const override
 Returns the type of this member. More...
 
const TypeGetType () const
 Returns the type of this static member. More...
 
bool IsConstant () const
 Returns whether this member is a constant. 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 &newval)
 Changes the value of this member. More...
 
- Public Member Functions inherited from StaticMember
 StaticMember (const std::string &name, const std::string &help)
 
bool IsInstanceable () const
 Whether this member can be used to instantiate an object. More...
 
virtual bool IsInstanceMember () const override final
 Returns if this member is an instance member. 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 () const =0
 This function should return the data. It is overloaded to enforce modifiers. More...
 
virtual void set (Data &newval)=0
 Implementers of static data member should overload this function for assignment. 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
 

Additional Inherited Members

- Public Types inherited from StaticMember
enum  MemberType {
  RegularType, EventType, EnumType, Namespace,
  DataMember, Function, Constant
}
 Possible member types. More...
 

Constructor & Destructor Documentation

◆ StaticDataMember() [1/3]

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

◆ StaticDataMember() [2/3]

StaticDataMember ( const std::string &  name,
const std::string &  help,
const Type type 
)

◆ StaticDataMember() [3/3]

StaticDataMember ( const std::string &  name,
const std::string &  help,
const Type type,
Tag  first,
P_ ...  rest 
)

Member Function Documentation

◆ get()

virtual Data get ( ) const
protectedpure virtual

This function should return the data. It is overloaded to enforce modifiers.

Implemented in MappedROStaticDataMember< T_ >.

◆ Get()

virtual Data Get ( ) const
overridevirtual

◆ GetMemberType()

virtual MemberType GetMemberType ( ) const
overridevirtual

Returns the type of this member.

Implements StaticMember.

References StaticMember::DataMember.

◆ GetType()

const Type& GetType ( ) const

Returns the type of this static member.

References StaticDataMember::type.

◆ IsConstant()

bool IsConstant ( ) const

Returns whether this member is a constant.

References StaticDataMember::constant.

◆ 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 StaticDataMember::readonly.

◆ IsReference()

bool IsReference ( ) const

Returns whether this member is a reference.

References StaticDataMember::reference.

◆ Set()

void Set ( Data newval)

Changes the value of this member.

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

◆ set()

virtual void set ( Data newval)
protectedpure virtual

Implementers of static data member should overload this function for assignment.

If readonly is set, this function will not be called, instead, the public set function will throw readonly exception.

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: