updated: SpaceToJSON (not finished yet)
git-svn-id: svn://ttmath.org/publicrep/pikotools/trunk@428 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -42,8 +42,21 @@ namespace PT
|
||||
{
|
||||
|
||||
|
||||
void SpaceToJSON::ChangeSpacesToTable(const wchar_t * space_name)
|
||||
{
|
||||
spaces_to_table.push_back(space_name);
|
||||
}
|
||||
|
||||
bool SpaceToJSON::HasUnnamedSpace(Space & space) const
|
||||
|
||||
void SpaceToJSON::ChangeSpacesToTable(const std::wstring & space_name)
|
||||
{
|
||||
spaces_to_table.push_back(space_name);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
bool SpaceToJSON::HasUnnamedSpace(Space & space)
|
||||
{
|
||||
for(size_t i=0 ; i<space.spaces.size() ; ++i)
|
||||
if( space.spaces[i]->name.empty() )
|
||||
@@ -54,6 +67,56 @@ return false;
|
||||
|
||||
|
||||
|
||||
bool SpaceToJSON::HasSpace(Space & space, const std::wstring & name)
|
||||
{
|
||||
for(size_t i=0 ; i<space.spaces.size() ; ++i)
|
||||
if( space.spaces[i]->name == name )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
void SpaceToJSON::TreatAsNumeric(const wchar_t * name)
|
||||
{
|
||||
numeric.insert(name);
|
||||
}
|
||||
|
||||
|
||||
void SpaceToJSON::TreatAsNumeric(const std::wstring & name)
|
||||
{
|
||||
numeric.insert(name);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void SpaceToJSON::TreatAsBool(const wchar_t * name)
|
||||
{
|
||||
boolean.insert(name);
|
||||
}
|
||||
|
||||
void SpaceToJSON::TreatAsBool(const std::wstring & name)
|
||||
{
|
||||
boolean.insert(name);
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool SpaceToJSON::IsNumeric(const std::wstring & name)
|
||||
{
|
||||
std::set<std::wstring>::iterator i = numeric.find(name);
|
||||
return i != numeric.end();
|
||||
}
|
||||
|
||||
|
||||
bool SpaceToJSON::IsBool(const std::wstring & name)
|
||||
{
|
||||
std::set<std::wstring>::iterator i = boolean.find(name);
|
||||
return i != boolean.end();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user