载入中...
搜索中...
未找到
eve::social::Social类 参考

Script-facing module for generic social graph composition. 更多...

#include <Social.h>

类 eve::social::Social 继承关系图:
eve::Module

Public 成员函数

 Module_REG (Social)
 
 Social ()=default
 Constructs a Social.
 
 ~Social () override=default
 Releases Social resources.
 
std::string idFromInt (int id) const
 Returns the canonical graph key for an integer entity ID.
 
bool setOwner (const std::string &entity, const std::string &owner)
 Sets ownership between string IDs.
 
bool setOwnerInt (int entity, int owner)
 Sets ownership between integer IDs.
 
std::string ownerOf (const std::string &entity) const
 Gets owner of a string ID.
 
std::string ownerOfInt (int entity) const
 Gets owner of an integer ID as a canonical key.
 
int ownedCount (const std::string &owner) const
 Gets count of deterministically ordered entities owned by owner.
 
std::string ownedAt (const std::string &owner, int index) const
 Gets an owned entity by deterministic index.
 
bool setController (const std::string &entity, const std::string &controller)
 Sets control between string IDs.
 
bool setControllerInt (int entity, int controller)
 Sets control between integer IDs.
 
std::string controllerOf (const std::string &entity) const
 Gets controller of a string ID.
 
std::string controllerOfInt (int entity) const
 Gets controller of an integer ID as a canonical key.
 
int controlledCount (const std::string &controller) const
 Gets count of deterministically ordered controlled entities.
 
std::string controlledAt (const std::string &controller, int index) const
 Gets a controlled entity by deterministic index.
 
bool assign (const std::string &source, const std::string &role, const std::string &target)
 Adds a role-based assignment between string IDs.
 
bool assignInt (int source, const std::string &role, int target)
 Adds a role-based assignment between integer IDs.
 
bool unassign (const std::string &source, const std::string &role, const std::string &target)
 Removes an exact assignment.
 
bool isAssigned (const std::string &source, const std::string &role, const std::string &target) const
 Tests an exact assignment.
 
int targetCount (const std::string &source, const std::string &role) const
 Gets target count for source and role.
 
std::string targetAt (const std::string &source, const std::string &role, int index) const
 Gets an assignment target by deterministic index.
 
int assigneeCount (const std::string &target, const std::string &role) const
 Gets assignee count for target and role.
 
std::string assigneeAt (const std::string &target, const std::string &role, int index) const
 Gets an assignee by deterministic index.
 
bool setRelation (const std::string &source, const std::string &target, const std::string &type, float value)
 Sets a directed typed relation between string IDs.
 
bool setRelationInt (int source, int target, const std::string &type, float value)
 Sets a directed typed relation between integer IDs.
 
float addRelation (const std::string &source, const std::string &target, const std::string &type, float delta)
 Adds to a relation and returns its new value.
 
bool link (const std::string &source, const std::string &target, const std::string &type)
 Creates a weight-one directed typed relation.
 
bool removeRelation (const std::string &source, const std::string &target, const std::string &type)
 Removes an exact relation.
 
bool hasRelation (const std::string &source, const std::string &target, const std::string &type) const
 Tests an exact relation.
 
float relation (const std::string &source, const std::string &target, const std::string &type, float fallback) const
 Gets relation value or fallback.
 
int relationTargetCount (const std::string &source, const std::string &type, float minimum) const
 Gets outgoing relation target count after threshold filtering.
 
std::string relationTargetAt (const std::string &source, const std::string &type, float minimum, int index) const
 Gets outgoing relation target by deterministic filtered index.
 
int relationSourceCount (const std::string &target, const std::string &type, float minimum) const
 Gets incoming relation source count after threshold filtering.
 
std::string relationSourceAt (const std::string &target, const std::string &type, float minimum, int index) const
 Gets incoming relation source by deterministic filtered index.
 
bool removeEntity (const std::string &entity)
 Removes a string-ID entity and every graph reference to it.
 
bool removeEntityInt (int entity)
 Removes an integer-ID entity and every graph reference to it.
 
void clear ()
 Clears all graph state and events.
 
int eventCount () const
 Gets queued change event count.
 
int eventSequence (int index) const
 Gets event sequence by index, or zero when out of range.
 
std::string eventAction (int index) const
 Gets event action by index.
 
std::string eventSource (int index) const
 Gets event source by index.
 
std::string eventTarget (int index) const
 Gets event target by index.
 
std::string eventType (int index) const
 Gets event type/role by index.
 
float eventOldValue (int index) const
 Gets event old numeric value by index.
 
float eventNewValue (int index) const
 Gets event new numeric value by index.
 
void clearEvents ()
 Clears queued events only.
 
SocialGraph & graph ()
 Gives C++ callers direct access to this module's graph.
 
- Public 成员函数 继承自 eve::Module
virtual ~Module ()
 Module.
 
virtual std::string getName () const =0
 Returns the name.
 

详细描述

Script-facing module for generic social graph composition.

在文件 Social.h 第 11 行定义.

构造及析构函数说明

◆ Social()

eve::social::Social::Social ( )
default

Constructs a Social.

◆ ~Social()

eve::social::Social::~Social ( )
overridedefault

Releases Social resources.

成员函数说明

◆ addRelation()

float eve::social::Social::addRelation ( const std::string &  source,
const std::string &  target,
const std::string &  type,
float  delta 
)

Adds to a relation and returns its new value.

在文件 Social.cpp 第 78 行定义.

引用了 eve::social::SocialGraph::addRelation(), source, target , 以及 type.

◆ assign()

bool eve::social::Social::assign ( const std::string &  source,
const std::string &  role,
const std::string &  target 
)

Adds a role-based assignment between string IDs.

在文件 Social.cpp 第 47 行定义.

引用了 eve::social::SocialGraph::assign(), source , 以及 target.

◆ assigneeAt()

std::string eve::social::Social::assigneeAt ( const std::string &  target,
const std::string &  role,
int  index 
) const

Gets an assignee by deterministic index.

在文件 Social.cpp 第 68 行定义.

引用了 eve::social::SocialGraph::assigneesOf(), at, index , 以及 target.

◆ assigneeCount()

int eve::social::Social::assigneeCount ( const std::string &  target,
const std::string &  role 
) const

Gets assignee count for target and role.

在文件 Social.cpp 第 65 行定义.

引用了 eve::social::SocialGraph::assigneesOf() , 以及 target.

◆ assignInt()

bool eve::social::Social::assignInt ( int  source,
const std::string &  role,
int  target 
)

Adds a role-based assignment between integer IDs.

在文件 Social.cpp 第 50 行定义.

引用了 eve::social::SocialGraph::assign(), eve::social::SocialGraph::integerId(), source , 以及 target.

◆ clear()

void eve::social::Social::clear ( )

Clears all graph state and events.

在文件 Social.cpp 第 111 行定义.

引用了 eve::social::SocialGraph::clear().

◆ clearEvents()

void eve::social::Social::clearEvents ( )

Clears queued events only.

在文件 Social.cpp 第 142 行定义.

引用了 eve::social::SocialGraph::clearEvents().

◆ controlledAt()

std::string eve::social::Social::controlledAt ( const std::string &  controller,
int  index 
) const

Gets a controlled entity by deterministic index.

在文件 Social.cpp 第 43 行定义.

引用了 at, eve::social::SocialGraph::controlledBy() , 以及 index.

◆ controlledCount()

int eve::social::Social::controlledCount ( const std::string &  controller) const

Gets count of deterministically ordered controlled entities.

在文件 Social.cpp 第 40 行定义.

引用了 eve::social::SocialGraph::controlledBy().

◆ controllerOf()

std::string eve::social::Social::controllerOf ( const std::string &  entity) const

Gets controller of a string ID.

在文件 Social.cpp 第 38 行定义.

引用了 eve::social::SocialGraph::controllerOf().

◆ controllerOfInt()

std::string eve::social::Social::controllerOfInt ( int  entity) const

Gets controller of an integer ID as a canonical key.

在文件 Social.cpp 第 39 行定义.

引用了 eve::social::SocialGraph::controllerOf() , 以及 eve::social::SocialGraph::integerId().

◆ eventAction()

std::string eve::social::Social::eventAction ( int  index) const

Gets event action by index.

在文件 Social.cpp 第 118 行定义.

引用了 index.

◆ eventCount()

int eve::social::Social::eventCount ( ) const

Gets queued change event count.

在文件 Social.cpp 第 113 行定义.

引用了 eve::social::SocialGraph::events().

◆ eventNewValue()

float eve::social::Social::eventNewValue ( int  index) const

Gets event new numeric value by index.

在文件 Social.cpp 第 138 行定义.

引用了 index.

◆ eventOldValue()

float eve::social::Social::eventOldValue ( int  index) const

Gets event old numeric value by index.

在文件 Social.cpp 第 134 行定义.

引用了 index.

◆ eventSequence()

int eve::social::Social::eventSequence ( int  index) const

Gets event sequence by index, or zero when out of range.

在文件 Social.cpp 第 114 行定义.

引用了 index.

◆ eventSource()

std::string eve::social::Social::eventSource ( int  index) const

Gets event source by index.

在文件 Social.cpp 第 122 行定义.

引用了 index.

◆ eventTarget()

std::string eve::social::Social::eventTarget ( int  index) const

Gets event target by index.

在文件 Social.cpp 第 126 行定义.

引用了 index.

◆ eventType()

std::string eve::social::Social::eventType ( int  index) const

Gets event type/role by index.

在文件 Social.cpp 第 130 行定义.

引用了 index.

◆ graph()

SocialGraph & eve::social::Social::graph ( )
inline

Gives C++ callers direct access to this module's graph.

在文件 Social.h 第 115 行定义.

◆ hasRelation()

bool eve::social::Social::hasRelation ( const std::string &  source,
const std::string &  target,
const std::string &  type 
) const

Tests an exact relation.

在文件 Social.cpp 第 87 行定义.

引用了 eve::social::SocialGraph::hasRelation(), source, target , 以及 type.

◆ idFromInt()

std::string eve::social::Social::idFromInt ( int  id) const

Returns the canonical graph key for an integer entity ID.

在文件 Social.cpp 第 21 行定义.

引用了 eve::social::SocialGraph::integerId().

◆ isAssigned()

bool eve::social::Social::isAssigned ( const std::string &  source,
const std::string &  role,
const std::string &  target 
) const

Tests an exact assignment.

在文件 Social.cpp 第 56 行定义.

引用了 eve::social::SocialGraph::isAssigned(), source , 以及 target.

◆ link()

bool eve::social::Social::link ( const std::string &  source,
const std::string &  target,
const std::string &  type 
)

Creates a weight-one directed typed relation.

在文件 Social.cpp 第 81 行定义.

引用了 eve::social::SocialGraph::link(), source, target , 以及 type.

◆ Module_REG()

eve::social::Social::Module_REG ( Social  )

◆ ownedAt()

std::string eve::social::Social::ownedAt ( const std::string &  owner,
int  index 
) const

Gets an owned entity by deterministic index.

在文件 Social.cpp 第 30 行定义.

引用了 at, index , 以及 eve::social::SocialGraph::ownedBy().

◆ ownedCount()

int eve::social::Social::ownedCount ( const std::string &  owner) const

Gets count of deterministically ordered entities owned by owner.

在文件 Social.cpp 第 29 行定义.

引用了 eve::social::SocialGraph::ownedBy().

◆ ownerOf()

std::string eve::social::Social::ownerOf ( const std::string &  entity) const

Gets owner of a string ID.

在文件 Social.cpp 第 27 行定义.

引用了 eve::social::SocialGraph::ownerOf().

◆ ownerOfInt()

std::string eve::social::Social::ownerOfInt ( int  entity) const

Gets owner of an integer ID as a canonical key.

在文件 Social.cpp 第 28 行定义.

引用了 eve::social::SocialGraph::integerId() , 以及 eve::social::SocialGraph::ownerOf().

◆ relation()

float eve::social::Social::relation ( const std::string &  source,
const std::string &  target,
const std::string &  type,
float  fallback 
) const

Gets relation value or fallback.

在文件 Social.cpp 第 90 行定义.

引用了 eve::social::SocialGraph::relation(), source, target , 以及 type.

◆ relationSourceAt()

std::string eve::social::Social::relationSourceAt ( const std::string &  target,
const std::string &  type,
float  minimum,
int  index 
) const

Gets incoming relation source by deterministic filtered index.

在文件 Social.cpp 第 104 行定义.

引用了 at, index, minimum, eve::social::SocialGraph::relationSources(), target , 以及 type.

◆ relationSourceCount()

int eve::social::Social::relationSourceCount ( const std::string &  target,
const std::string &  type,
float  minimum 
) const

Gets incoming relation source count after threshold filtering.

在文件 Social.cpp 第 101 行定义.

引用了 minimum, eve::social::SocialGraph::relationSources(), target , 以及 type.

◆ relationTargetAt()

std::string eve::social::Social::relationTargetAt ( const std::string &  source,
const std::string &  type,
float  minimum,
int  index 
) const

Gets outgoing relation target by deterministic filtered index.

在文件 Social.cpp 第 97 行定义.

引用了 at, index, minimum, eve::social::SocialGraph::relationTargets(), source , 以及 type.

◆ relationTargetCount()

int eve::social::Social::relationTargetCount ( const std::string &  source,
const std::string &  type,
float  minimum 
) const

Gets outgoing relation target count after threshold filtering.

在文件 Social.cpp 第 94 行定义.

引用了 minimum, eve::social::SocialGraph::relationTargets(), source , 以及 type.

◆ removeEntity()

bool eve::social::Social::removeEntity ( const std::string &  entity)

Removes a string-ID entity and every graph reference to it.

在文件 Social.cpp 第 109 行定义.

引用了 eve::social::SocialGraph::removeEntity().

◆ removeEntityInt()

bool eve::social::Social::removeEntityInt ( int  entity)

Removes an integer-ID entity and every graph reference to it.

在文件 Social.cpp 第 110 行定义.

引用了 eve::social::SocialGraph::integerId() , 以及 eve::social::SocialGraph::removeEntity().

◆ removeRelation()

bool eve::social::Social::removeRelation ( const std::string &  source,
const std::string &  target,
const std::string &  type 
)

Removes an exact relation.

在文件 Social.cpp 第 84 行定义.

引用了 eve::social::SocialGraph::removeRelation(), source, target , 以及 type.

◆ setController()

bool eve::social::Social::setController ( const std::string &  entity,
const std::string &  controller 
)

Sets control between string IDs.

在文件 Social.cpp 第 32 行定义.

引用了 eve::social::SocialGraph::setController().

◆ setControllerInt()

bool eve::social::Social::setControllerInt ( int  entity,
int  controller 
)

Sets control between integer IDs.

在文件 Social.cpp 第 35 行定义.

引用了 eve::social::SocialGraph::integerId() , 以及 eve::social::SocialGraph::setController().

◆ setOwner()

bool eve::social::Social::setOwner ( const std::string &  entity,
const std::string &  owner 
)

Sets ownership between string IDs.

在文件 Social.cpp 第 23 行定义.

引用了 eve::social::SocialGraph::setOwner().

◆ setOwnerInt()

bool eve::social::Social::setOwnerInt ( int  entity,
int  owner 
)

Sets ownership between integer IDs.

在文件 Social.cpp 第 24 行定义.

引用了 eve::social::SocialGraph::integerId() , 以及 eve::social::SocialGraph::setOwner().

◆ setRelation()

bool eve::social::Social::setRelation ( const std::string &  source,
const std::string &  target,
const std::string &  type,
float  value 
)

Sets a directed typed relation between string IDs.

在文件 Social.cpp 第 72 行定义.

引用了 eve::social::SocialGraph::setRelation(), source, target, type , 以及 value.

◆ setRelationInt()

bool eve::social::Social::setRelationInt ( int  source,
int  target,
const std::string &  type,
float  value 
)

Sets a directed typed relation between integer IDs.

在文件 Social.cpp 第 75 行定义.

引用了 eve::social::SocialGraph::integerId(), eve::social::SocialGraph::setRelation(), source, target, type , 以及 value.

◆ targetAt()

std::string eve::social::Social::targetAt ( const std::string &  source,
const std::string &  role,
int  index 
) const

Gets an assignment target by deterministic index.

在文件 Social.cpp 第 62 行定义.

引用了 at, index, source , 以及 eve::social::SocialGraph::targetsOf().

◆ targetCount()

int eve::social::Social::targetCount ( const std::string &  source,
const std::string &  role 
) const

Gets target count for source and role.

在文件 Social.cpp 第 59 行定义.

引用了 source , 以及 eve::social::SocialGraph::targetsOf().

◆ unassign()

bool eve::social::Social::unassign ( const std::string &  source,
const std::string &  role,
const std::string &  target 
)

Removes an exact assignment.

在文件 Social.cpp 第 53 行定义.

引用了 source, target , 以及 eve::social::SocialGraph::unassign().


该类的文档由以下文件生成: