OpenClonk
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 130 of file C4ValueArray.cpp.

Constructor & Destructor Documentation

◆ C4ValueArraySortPropertycomp()

C4ValueArraySortPropertycomp::C4ValueArraySortPropertycomp ( C4String prop_name)
inline

Definition at line 133 of file C4ValueArray.cpp.

Member Function Documentation

◆ operator()()

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

Definition at line 134 of file C4ValueArray.cpp.

135  {
136  C4Value p1,p2;
137  if (!v1._getPropList()->GetPropertyByS(prop_name, &p1)) p1.Set0();
138  if (!v2._getPropList()->GetPropertyByS(prop_name, &p2)) p2.Set0();
139  return value_sort(p1,p2);
140  }
virtual bool GetPropertyByS(const C4String *k, C4Value *pResult) const
Definition: C4PropList.cpp:726
C4PropList * _getPropList() const
Definition: C4Value.h:129
void Set0()
Definition: C4Value.h:332
C4ValueArraySortcomp value_sort

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

Here is the call graph for this function:

Member Data Documentation

◆ prop_name

C4String* C4ValueArraySortPropertycomp::prop_name

Definition at line 132 of file C4ValueArray.cpp.

Referenced by operator()().

◆ value_sort

C4ValueArraySortcomp C4ValueArraySortPropertycomp::value_sort

Definition at line 132 of file C4ValueArray.cpp.

Referenced by operator()().


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