VL
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
dmb::Content Class Reference

#include <DMBCore.h>

Public Member Functions

vl::Object & Add (const std::string &, vl::Object &proto)
 
vl::Var & Add (const std::string &, vl::Var &value)
 
int ItemCount () const
 
vl::Var & Get (const std::string &entityName)
 
const vl::Var & Get (const std::string &entityName) const
 
bool Has (const std::string &entityName) const
 
bool Remove (const std::string &entityName)
 
bool Rename (const std::string &entityName, const std::string &newName)
 
bool ForeachItem (const std::function< bool(const std::string &, vl::Object &)> &pred)
 
bool ForeachItem (const std::function< bool(const std::string &, const vl::Object &)> &pred) const
 
bool Store (const std::string &filePath, const vl::CnvParams &params=vl::CnvParams())
 
std::string JSONStr (const vl::CnvParams &params=vl::CnvParams())
 
vl::Object & GetData ()
 
const vl::Object & GetData () const
 
void Clear (bool recursive=false)
 

Protected Member Functions

void Init (const vl::Object &data, const TypeResolver &typeResolver)
 

Protected Attributes

vl::Object mData
 
TypeResolver mTypeResolver
 

Friends

class Model
 

Member Function Documentation

◆ Add() [1/2]

vl::Object & dmb::Content::Add ( const std::string &  entityName,
vl::Object &  proto 
)

◆ Add() [2/2]

vl::Var & dmb::Content::Add ( const std::string &  entityName,
vl::Var &  value 
)

◆ Clear()

void dmb::Content::Clear ( bool  recursive = false)

◆ ForeachItem() [1/2]

bool dmb::Content::ForeachItem ( const std::function< bool(const std::string &, const vl::Object &)> &  pred) const

◆ ForeachItem() [2/2]

bool dmb::Content::ForeachItem ( const std::function< bool(const std::string &, vl::Object &)> &  pred)

◆ Get() [1/2]

vl::Var & dmb::Content::Get ( const std::string &  entityName)

◆ Get() [2/2]

const vl::Var & dmb::Content::Get ( const std::string &  entityName) const

◆ GetData() [1/2]

vl::Object & dmb::Content::GetData ( )

◆ GetData() [2/2]

const vl::Object & dmb::Content::GetData ( ) const

◆ Has()

bool dmb::Content::Has ( const std::string &  entityName) const

◆ Init()

void dmb::Content::Init ( const vl::Object &  data,
const TypeResolver &  typeResolver 
)
protected

◆ ItemCount()

int dmb::Content::ItemCount ( ) const

◆ JSONStr()

std::string dmb::Content::JSONStr ( const vl::CnvParams params = vl::CnvParams())

◆ Remove()

bool dmb::Content::Remove ( const std::string &  entityName)

◆ Rename()

bool dmb::Content::Rename ( const std::string &  entityName,
const std::string &  newName 
)

◆ Store()

bool dmb::Content::Store ( const std::string &  filePath,
const vl::CnvParams params = vl::CnvParams() 
)

Friends And Related Function Documentation

◆ Model

friend class Model
friend

Member Data Documentation

◆ mData

vl::Object dmb::Content::mData
protected

◆ mTypeResolver

TypeResolver dmb::Content::mTypeResolver
protected

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