OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
C4ValueArraySortPropertycomp Struct Reference
Collaboration diagram for C4ValueArraySortPropertycomp:
[legend]

Public Member Functions

 C4ValueArraySortPropertycomp (C4String *prop_name)
 
bool operator() (const C4Value &v1, const C4Value &v2)
 

Public Attributes

C4Stringprop_name
 
C4ValueArraySortcomp value_sort
 

Detailed Description

Definition at line 136 of file C4ValueArray.cpp.

Constructor & Destructor Documentation

C4ValueArraySortPropertycomp::C4ValueArraySortPropertycomp ( C4String prop_name)
inline

Definition at line 139 of file C4ValueArray.cpp.

139 : prop_name(prop_name) {}

Member Function Documentation

bool C4ValueArraySortPropertycomp::operator() ( const C4Value v1,
const C4Value v2 
)
inline

Definition at line 140 of file C4ValueArray.cpp.

References C4Value::_getPropList(), C4PropList::GetPropertyByS(), C4Value::Set0(), and value_sort.

141  {
142  C4Value p1,p2;
143  if (!v1._getPropList()->GetPropertyByS(prop_name, &p1)) p1.Set0();
144  if (!v2._getPropList()->GetPropertyByS(prop_name, &p2)) p2.Set0();
145  return value_sort(p1,p2);
146  }
void Set0()
Definition: C4Value.h:336
C4ValueArraySortcomp value_sort
virtual bool GetPropertyByS(const C4String *k, C4Value *pResult) const
Definition: C4PropList.cpp:734
C4PropList * _getPropList() const
Definition: C4Value.h:129

Here is the call graph for this function:

Member Data Documentation

C4String* C4ValueArraySortPropertycomp::prop_name

Definition at line 138 of file C4ValueArray.cpp.

C4ValueArraySortcomp C4ValueArraySortPropertycomp::value_sort

Definition at line 138 of file C4ValueArray.cpp.

Referenced by operator()().


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