Gorgon Game Engine
Constant Class Reference

This class represents a static constant. More...

Inheritance diagram for Constant:
[legend]

Public Member Functions

 Constant (const std::string &name, const std::string &help, Data value)
 
virtual Data Get () const override final
 Returns the value of this static member. More...
 
virtual MemberType GetMemberType () const override final
 Returns the type of this member. More...
 
const TypeGetType () const
 Returns the type of the constant. 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 Attributes

Data value
 
- 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...
 
- Protected Member Functions inherited from Member
virtual void SetParent (const Member &parent)
 Changes the parent of the member. More...
 

Detailed Description

This class represents a static constant.

Its value is fixed after its construction

Constructor & Destructor Documentation

◆ Constant()

Constant ( const std::string &  name,
const std::string &  help,
Data  value 
)

Member Function Documentation

◆ Get()

virtual Data Get ( ) const
finaloverridevirtual

Returns the value of this static member.

For types and functions, this function returns type and function objects.

Implements StaticMember.

References Constant::value.

◆ GetMemberType()

virtual MemberType GetMemberType ( ) const
finaloverridevirtual

Returns the type of this member.

Implements StaticMember.

References StaticMember::Constant.

◆ GetType()

const Type& GetType ( ) const

Returns the type of the constant.

References Data::GetType(), and Constant::value.

Member Data Documentation

◆ value

Data value
protected

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