Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions Client/App/include/reflection/reflection.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,6 @@ namespace RBX

private:
virtual void assignIDREF(Reflection::DescribedBase*, const InstanceHandle&) const = 0;
public:
//IIDREF(const IIDREF&);
IIDREF()
{
}
public:
//IIDREF& operator=(const IIDREF&);
};

namespace Reflection
Expand Down
8 changes: 5 additions & 3 deletions Client/App/include/util/Handle.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ namespace RBX
{
}
public:
InstanceHandle& operator=(boost::shared_ptr<Instance>); // possibly just linkTo
InstanceHandle& operator=(boost::shared_ptr<Instance> object)
{
linkTo(object);
return *this;
}
//InstanceHandle& operator=(const InstanceHandle&);
bool empty() const;
boost::shared_ptr<Instance> getTarget() const;
Expand All @@ -42,7 +46,5 @@ namespace RBX
bool operatorEqual(const InstanceHandle& other) const;
bool operatorLess(const InstanceHandle& other) const;
bool operatorGreater(const InstanceHandle& other) const;
public:
~InstanceHandle() {}
};
}
10 changes: 8 additions & 2 deletions Client/App/include/v8datamodel/GlobalSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ namespace RBX
class Item : public NonFactoryProduct<Instance, NULL>
{
protected:
virtual bool askAddChild(const Instance*) const;
virtual bool askAddChild(const Instance* instance) const
{
return fastDynamicCast<const GlobalSettings::Item>(instance) != NULL;
}
public:
//Item(const Item&);
Item();
Expand All @@ -26,7 +29,10 @@ namespace RBX
static boost::recursive_mutex mutex;

//GlobalSettings(const GlobalSettings&);
GlobalSettings();
GlobalSettings()
{
setName("Global Settings");
}
void loadState();
void saveState();
void eraseSettingsStore();
Expand Down
2 changes: 0 additions & 2 deletions Client/App/include/v8tree/Instance.h
Original file line number Diff line number Diff line change
Expand Up @@ -347,14 +347,12 @@ namespace RBX
protected:
XmlElement root;
public:
//XmlState(const XmlState&);
XmlState();
const XmlElement* getData() const;
virtual void addState(XmlElement*, Instance&) = 0;
void addAllProperties(Instance&);
void addParentProperty(Instance&);
void addDelete(Instance&);
void addProperty(Reflection::Property&);
~XmlState();
};
}
11 changes: 2 additions & 9 deletions Client/App/include/v8tree/Verb.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,14 @@ namespace RBX
public:
virtual void setDirty(bool) = 0;
virtual bool isDirty() const = 0;
//IDataState(const IDataState&);
IDataState();
~IDataState();
//IDataState& operator=(const IDataState&);
};

class Verb : public Debugable
{
private:
const Name& name;
VerbContainer* container;
public:
Verb(const Verb&);

protected:
Verb(VerbContainer*, const Name&);
Verb(VerbContainer*, std::string);
Expand All @@ -46,8 +41,8 @@ namespace RBX
private:
std::map<const Name*, Verb*> verbs;
VerbContainer* parent;

public:
VerbContainer(const VerbContainer&);
VerbContainer(VerbContainer* parent);
virtual ~VerbContainer();

Expand All @@ -58,7 +53,5 @@ namespace RBX
private:
void addVerb(Verb*);
void removeVerb(Verb*);
public:
//VerbContainer& operator=(const VerbContainer&);
};
}
11 changes: 0 additions & 11 deletions Client/App/include/v8xml/SerializerV2.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ namespace RBX
virtual void announceIDREF(const XmlNameValuePair* valueIDREF, Reflection::DescribedBase* propertyOwner, const IIDREF* idref) = 0;
protected:
void assign(const IIDREF*, Reflection::DescribedBase*, const InstanceHandle&);
public:
//IReferenceBinder(const IReferenceBinder&);
IReferenceBinder();
public:
//IReferenceBinder& operator=(const IReferenceBinder&);
};

class MergeBinder : public IReferenceBinder
Expand Down Expand Up @@ -69,12 +64,6 @@ class ArchiveBinder : public RBX::MergeBinder
virtual bool processIDREF(const XmlNameValuePair* valueIDREF, RBX::Reflection::DescribedBase* propertyOwner, const RBX::IIDREF* idref);
bool resolveIDREF(IDREFBinding binding);
virtual bool resolveRefs();
public:
//ArchiveBinder(const ArchiveBinder&);
ArchiveBinder();
~ArchiveBinder();
public:
ArchiveBinder& operator=(const ArchiveBinder&);
};

class SerializerV2
Expand Down
7 changes: 7 additions & 0 deletions Client/App/v8datamodel/GlobalSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,12 @@

namespace RBX
{
boost::shared_ptr<GlobalSettings> GlobalSettings::singleton()
{
boost::recursive_mutex::scoped_lock lock(mutex);

static boost::shared_ptr<GlobalSettings> sing = Creatable::create<GlobalSettings>();

return sing;
}
}
13 changes: 13 additions & 0 deletions Client/App/v8tree/Verb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@

namespace RBX
{
VerbContainer::VerbContainer(VerbContainer* parent)
: parent(parent)
{
}

VerbContainer::~VerbContainer()
{
while (verbs.begin() != verbs.end())
{
delete verbs.begin()->second;
}
}

void VerbContainer::setVerbParent(VerbContainer* parent)
{
this->parent = parent;
Expand Down
32 changes: 32 additions & 0 deletions Client/App/v8xml/SerializerV2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,22 @@ namespace RBX
else
return false;
}

bool MergeBinder::resolveRefs()
{
for (std::vector<IDREFItem>::iterator iter = deferredIDREFItems.begin(); iter != deferredIDREFItems.end(); iter++)
{
const IIDREF*& idref = iter->idref;
Reflection::DescribedBase*& propertyOwner = iter->propertyOwner;
InstanceHandle& value = iter->value;

idref->assignIDREF(propertyOwner, value);
}

deferredIDREFItems.clear();

return true;
}
}

bool ArchiveBinder::resolveRefs()
Expand Down Expand Up @@ -84,6 +100,22 @@ bool ArchiveBinder::resolveIDREF(IDREFBinding binding)
}
}

bool ArchiveBinder::processID(const XmlNameValuePair* valueID, RBX::Instance* source)
{
if (!MergeBinder::processID(valueID, source))
{
std::string s;
bool success = valueID->getValue(s);

RBXASSERT(success);
RBXASSERT(idMap.find(s) == idMap.end());

idMap[s] = shared_from(source);
}

return true;
}

bool ArchiveBinder::processIDREF(const XmlNameValuePair* valueIDREF, RBX::Reflection::DescribedBase* propertyOwner, const RBX::IIDREF* idref)
{
if(!MergeBinder::processIDREF(valueIDREF, propertyOwner, idref))
Expand Down